From: Fabian Grünbichler Date: Fri, 21 Jan 2022 10:23:25 +0000 (+0100) Subject: test: extend intersection tests X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=commitdiff_plain;h=1bd10ecfa9c36327900b0b69b011002b52e43668 test: extend intersection tests to check the previous commit's fix. Signed-off-by: Fabian Grünbichler --- diff --git a/src/test/perm-test8.pl b/src/test/perm-test8.pl index 67e0cb1..83ca1f2 100644 --- a/src/test/perm-test8.pl +++ b/src/test/perm-test8.pl @@ -62,6 +62,9 @@ check_roles('carol@pam!token', '/vms/200', 'NoAccess'); check_roles('max@pve!token', '/vms/200', 'storage_manager'); check_roles('max@pve!token2', '/vms/200', 'customer'); +# check intersection -> token has Administrator, but user only vm_admin +check_permission('max@pve!token2', '/vms/300', 'Permissions.Modify,VM.Allocate,VM.Audit,VM.Console'); + print "all tests passed\n"; exit (0); diff --git a/src/test/test8.cfg b/src/test/test8.cfg index 6b0eac6..2f85bfd 100644 --- a/src/test/test8.cfg +++ b/src/test/test8.cfg @@ -26,3 +26,5 @@ acl:1:/vms/200:@testgroup2:NoAccess: acl:1:/vms/200:carol@pam!token:vm_admin acl:1:/vms/200:max@pve!token:storage_manager acl:1:/vms/200:max@pve!token2:customer + +acl:1:/vms/300:max@pve!token2:Administrator