[pve-devel] r5569 - in pve-access-control/trunk: . PVE/API2

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Feb 21 07:32:52 CET 2011


Author: dietmar
Date: 2011-02-21 07:32:52 +0100 (Mon, 21 Feb 2011)
New Revision: 5569

Modified:
   pve-access-control/trunk/PVE/API2/Role.pm
   pve-access-control/trunk/pveum
Log:
include priviledges in list


Modified: pve-access-control/trunk/PVE/API2/Role.pm
===================================================================
--- pve-access-control/trunk/PVE/API2/Role.pm	2011-02-18 10:40:24 UTC (rev 5568)
+++ pve-access-control/trunk/PVE/API2/Role.pm	2011-02-21 06:32:52 UTC (rev 5569)
@@ -13,7 +13,6 @@
 
 use base qw(PVE::RESTHandler);
 
-# fixme: index should return more/all attributes?
 __PACKAGE__->register_method ({
     name => 'index', 
     path => '', 
@@ -41,7 +40,8 @@
 	my $usercfg = cfs_read_file("user.cfg");
  
 	foreach my $role (keys %{$usercfg->{roles}}) {
-	    push @$res, { id => $role };
+	    my $privs = join(',', keys %{$usercfg->{roles}->{$role}});
+	    push @$res, { id => $role, privs => $privs };
 	}
 
 	return $res;

Modified: pve-access-control/trunk/pveum
===================================================================
--- pve-access-control/trunk/pveum	2011-02-18 10:40:24 UTC (rev 5568)
+++ pve-access-control/trunk/pveum	2011-02-21 06:32:52 UTC (rev 5569)
@@ -69,6 +69,7 @@
     roleadd => [ 'PVE::API2::Role', 'create_role', ['roleid'] ],
     rolemod => [ 'PVE::API2::Role', 'update_role', ['roleid'] ],
     roledel => [ 'PVE::API2::Role', 'delete_role', ['roleid'] ],
+
     aclmod => [ 'PVE::API2::ACL', 'update_acl', ['path', 'uglist', 'roles'], { delete => 0 }],
     acldel => [ 'PVE::API2::ACL', 'update_acl', ['path', 'uglist', 'roles'], { delete => 1 }],
 };




More information about the pve-devel mailing list