mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-07-26 12:48:40 +00:00
correctly compute GUI capabilities (consider pools)
This commit is contained in:
parent
5bb4e06a64
commit
437be042c2
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ RELEASE=2.1
|
||||
|
||||
VERSION=1.0
|
||||
PACKAGE=libpve-access-control
|
||||
PKGREL=22
|
||||
PKGREL=23
|
||||
|
||||
DESTDIR=
|
||||
PREFIX=/usr
|
||||
|
@ -151,12 +151,22 @@ my $compute_api_permission = sub {
|
||||
dc => {},
|
||||
};
|
||||
|
||||
foreach my $vmid (keys %$idlist, '__phantom__') {
|
||||
my $perm = $rpcenv->permissions($authuser, "/vms/$vmid");
|
||||
my $extract_vm_caps = sub {
|
||||
my ($path) = @_;
|
||||
|
||||
my $perm = $rpcenv->permissions($authuser, $path);
|
||||
foreach my $priv (keys %$perm) {
|
||||
next if !($priv eq 'Permissions.Modify' ||$priv =~ m/^VM\./);
|
||||
next if !($priv eq 'Permissions.Modify' || $priv =~ m/^VM\./);
|
||||
$res->{vms}->{$priv} = 1;
|
||||
}
|
||||
};
|
||||
|
||||
foreach my $pool (keys %{$usercfg->{pools}}) {
|
||||
&$extract_vm_caps("/pool/$pool");
|
||||
}
|
||||
|
||||
foreach my $vmid (keys %$idlist, '__phantom__') {
|
||||
&$extract_vm_caps("/vms/$vmid");
|
||||
}
|
||||
|
||||
foreach my $storeid (@sids, '__phantom__') {
|
||||
|
@ -1,3 +1,9 @@
|
||||
libpve-access-control (1.0-23) unstable; urgency=low
|
||||
|
||||
* correctly compute GUI capabilities (consider pools)
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 30 May 2012 08:47:23 +0200
|
||||
|
||||
libpve-access-control (1.0-22) unstable; urgency=low
|
||||
|
||||
* new plugin architecture for Auth modules, minor API change for Auth
|
||||
|
Loading…
Reference in New Issue
Block a user