src/api2/access/role.rs: new api to list roles

This commit is contained in:
Dietmar Maurer
2020-04-17 14:03:24 +02:00
parent 4f66423fcc
commit 3fff55b293
4 changed files with 73 additions and 8 deletions

View File

@ -60,7 +60,7 @@ impl UserInformation for CachedUserInfo {
let roles = self.acl_tree.roles(userid, path);
let mut privs: u64 = 0;
for role in roles {
if let Some(role_privs) = ROLE_NAMES.get(role.as_str()) {
if let Some((role_privs, _)) = ROLE_NAMES.get(role.as_str()) {
privs |= role_privs;
}
}