mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-10-04 21:05:57 +00:00
rpcenv: improve user/token intersection
this could return undef for the propagation flag instead of 1/0, leading
to confusing displays of permission trees. all the actual checks using
the returned hash check for definedness anyway, so the actual
privileges checked and the displayed ones were not identical.
fixes: 7e8bcaa754
"roles()/permissions(): also return propagate flag"
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
92f571d9ff
commit
e8a0cee47b
@ -82,7 +82,8 @@ my $compile_acl_path = sub {
|
||||
if ($username && $username ne 'root@pam') {
|
||||
# intersect user and token permissions
|
||||
my $user_privs = $cache->{$username}->{privs}->{$path};
|
||||
$privs = { map { $_ => $user_privs->{$_} && $privs->{$_} } keys %$privs };
|
||||
my $filtered_privs = [ grep { $user_privs->{$_} } keys %$privs ];
|
||||
$privs = { map { $_ => $user_privs->{$_} && $privs->{$_} } @$filtered_privs };
|
||||
}
|
||||
|
||||
$data->{privs}->{$path} = $privs;
|
||||
|
Loading…
Reference in New Issue
Block a user