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 <d.csapak@proxmox.com>
This commit is contained in:
parent
5160c0e986
commit
b05672579e
@ -16,7 +16,7 @@ use crate::config::acl::{Role, ROLE_NAMES, PRIVILEGES};
|
|||||||
type: Object,
|
type: Object,
|
||||||
description: "User name with description.",
|
description: "User name with description.",
|
||||||
properties: {
|
properties: {
|
||||||
role: {
|
roleid: {
|
||||||
type: Role,
|
type: Role,
|
||||||
},
|
},
|
||||||
privs: {
|
privs: {
|
||||||
@ -49,7 +49,7 @@ fn list_roles() -> Result<Value, Error> {
|
|||||||
priv_list.push(name.clone());
|
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())
|
Ok(list.into())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user