[pbs-devel] applied: [PATCH proxmox-backup] pbs-config: acl-tree: add any_priv_below

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jun 7 08:23:24 CEST 2022


Am 03/06/2022 um 17:32 schrieb Stefan Sterz:
> `any_priv_below()` checks if a given AuthId has any given privileges
> on a sub-tree of the AclTree. to do so, it first takes into account
> propagating privileges on the path itself and then uses a depth-first
> search to check if any of the provided privileges are set on any
> node of the sub-tree pointed to by the path.
> 
> Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
> ---
>  pbs-config/src/acl.rs | 122 +++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 120 insertions(+), 2 deletions(-)
> 
>

applied, thanks! made a few small follow ups though, but mostly changing parameter
names and some small styling stuff, so nothing changed in the actual implementation.

And I put this to use for replacing the not so nice ns-iteration and one by one
checking for an Ok priv, making it faster and irrelevant for maintenance operations,
which is nice to have for UI-crucial API endpoints.





More information about the pbs-devel mailing list