[pve-devel] r5533 - in pve-manager/pve2/lib/PVE: . API2

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Feb 15 14:00:49 CET 2011


Author: dietmar
Date: 2011-02-15 14:00:49 +0100 (Tue, 15 Feb 2011)
New Revision: 5533

Modified:
   pve-manager/pve2/lib/PVE/API2/Nodes.pm
   pve-manager/pve2/lib/PVE/REST.pm
Log:


Modified: pve-manager/pve2/lib/PVE/API2/Nodes.pm
===================================================================
--- pve-manager/pve2/lib/PVE/API2/Nodes.pm	2011-02-15 12:47:17 UTC (rev 5532)
+++ pve-manager/pve2/lib/PVE/API2/Nodes.pm	2011-02-15 13:00:49 UTC (rev 5533)
@@ -159,7 +159,7 @@
     proxyto => 'node',
     permissions => {
 	path => '/nodes/{node}',
-	privs => [ 'SYS.Syslog' ],
+	privs => [ 'Sys.Syslog' ],
     },
     parameters => {
     	additionalProperties => 0,
@@ -212,6 +212,10 @@
 	    node => get_standard_option('pve-node'),
 	},
     },
+    permissions => {
+	path => '/nodes/{node}',
+	privs => [ 'Sys.Console' ],
+    },
     returns => { 
     	additionalProperties => 0,
 	properties => {

Modified: pve-manager/pve2/lib/PVE/REST.pm
===================================================================
--- pve-manager/pve2/lib/PVE/REST.pm	2011-02-15 12:47:17 UTC (rev 5532)
+++ pve-manager/pve2/lib/PVE/REST.pm	2011-02-15 13:00:49 UTC (rev 5533)
@@ -312,9 +312,11 @@
 	}
 	 
 	if (defined($params->{path}) || defined($params->{permissions})) {
-	    my $privs = PVE::Tools::split_list($params->{permissions});
+	    my @privs = PVE::Tools::split_list($params->{permissions});
 	    if (!($params->{path} && $params->{permissions} &&
-		  $aclcache->check($user, $params->{path}, $privs))) {
+		  $aclcache->check($user, $params->{path}, \@privs))) {
+
+		syslog("info", "TEST 5");
 		return { 
 		    status => HTTP_FORBIDDEN,
 		    message => "permission check failed ($params->{path}, $params->{permissions})",




More information about the pve-devel mailing list