[pve-devel] [PATCH v3 access-control 02/17] RPC env: add SuperUser API permission for GUI capabilities

Oguz Bektas o.bektas at proxmox.com
Wed Apr 6 13:57:19 CEST 2022


Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
v2->v3:
* it was missing from v2 series

 src/PVE/RPCEnvironment.pm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/PVE/RPCEnvironment.pm b/src/PVE/RPCEnvironment.pm
index cd4a0a5..34c8991 100644
--- a/src/PVE/RPCEnvironment.pm
+++ b/src/PVE/RPCEnvironment.pm
@@ -139,12 +139,12 @@ sub compute_api_permission {
 
     my $res = {};
     my $priv_re_map = {
-	vms => qr/VM\.|Permissions\.Modify/,
-	access => qr/(User|Group)\.|Permissions\.Modify/,
-	storage => qr/Datastore\.|Permissions\.Modify/,
-	nodes => qr/Sys\.|Permissions\.Modify/,
-	sdn => qr/SDN\.|Permissions\.Modify/,
-	dc => qr/Sys\.Audit|SDN\./,
+	vms => qr/VM\.|Permissions\.Modify|SuperUser/,
+	access => qr/(User|Group)\.|Permissions\.Modify|SuperUser/,
+	storage => qr/Datastore\.|Permissions\.Modify|SuperUser/,
+	nodes => qr/Sys\.|Permissions\.Modify|SuperUser/,
+	sdn => qr/SDN\.|Permissions\.Modify|SuperUser/,
+	dc => qr/Sys\.Audit|SDN\.|SuperUser/,
     };
     map { $res->{$_} = {} } keys %$priv_re_map;
 
-- 
2.30.2






More information about the pve-devel mailing list