]> git.proxmox.com Git - pve-access-control.git/commit - src/PVE/RPCEnvironment.pm
permissions: properly merge propagation flag
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 3 Jun 2022 11:50:47 +0000 (13:50 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 3 Jun 2022 11:53:02 +0000 (13:53 +0200)
commitb55e33f4e4bd842b3ed0b8072129e80bc5baccd8
tree44db27d61433838c2257095cf3c21d8d1c007162
parente3604d48276d9a33fbc08a8f14f5ab9b46075dad
permissions: properly merge propagation flag

when multiple roles are defined on a path that share a privilege, this
randomly took the propagation flag for the priv from the last role
encountered. since perl hashes are iterated randomly, this means the
propagation flag was sometimes set correctly, and sometimes not.

note that this propagation flag is only used for display/dumping
purposes, and for intersection with token privs (see next commit).
actual handling of propagation happens on the role level in
PVE::AccessControl::roles().

modified test case (spuriously) fails without the fix.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/RPCEnvironment.pm
src/test/test8.cfg