From b05672579e8a88b8e665527b6f200554092ba746 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Wed, 20 May 2020 12:15:32 +0200 Subject: [PATCH] api2/roles: change return field of role to roleid to be compatible with the pve api with this, we can reuse the ui parts (RoleSelector) Signed-off-by: Dominik Csapak --- src/api2/access/role.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api2/access/role.rs b/src/api2/access/role.rs index 2e114b75..745b64b9 100644 --- a/src/api2/access/role.rs +++ b/src/api2/access/role.rs @@ -16,7 +16,7 @@ use crate::config::acl::{Role, ROLE_NAMES, PRIVILEGES}; type: Object, description: "User name with description.", properties: { - role: { + roleid: { type: Role, }, privs: { @@ -49,7 +49,7 @@ fn list_roles() -> Result { priv_list.push(name.clone()); } } - list.push(json!({ "role": role, "privs": priv_list, "comment": comment })); + list.push(json!({ "roleid": role, "privs": priv_list, "comment": comment })); } Ok(list.into()) }