config: cached user info: expose new any_privs_below

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-06-04 14:50:43 +02:00
parent 0bed1f2956
commit 2c69b69108

View File

@ -179,6 +179,16 @@ impl CachedUserInfo {
(privs, propagated_privs)
}
/// Checks whether the `auth_id` has any of the privilegs `privs` on any object below `path`.
pub fn any_privs_below(
&self,
auth_id: &Authid,
path: &[&str],
privs: u64,
) -> Result<bool, Error> {
self.acl_tree.any_privs_below(auth_id, path, privs)
}
}
impl UserInformation for CachedUserInfo {