X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=blobdiff_plain;f=PVE%2FAPI2%2FACL.pm;h=84d7549cfb7809768ee63181aa1542595d27205d;hp=8c5c388584f60ed211df315620a8ec04b19269dd;hb=e4f8fc2e7e5f31691629a5361000636f8a2b2398;hpb=e3a3a0d746878fad68b2289d0e49c0bd7d954304 diff --git a/PVE/API2/ACL.pm b/PVE/API2/ACL.pm index 8c5c388..84d7549 100644 --- a/PVE/API2/ACL.pm +++ b/PVE/API2/ACL.pm @@ -21,6 +21,7 @@ __PACKAGE__->register_method ({ method => 'GET', description => "Get Access Control List (ACLs).", permissions => { + description => "The returned list is restricted to objects where you have rights to modify permissions.", user => 'all', }, parameters => { @@ -50,7 +51,7 @@ __PACKAGE__->register_method ({ my $usercfg = $rpcenv->{user_cfg}; if (!$usercfg || !$usercfg->{acl}) { - return {}; + return $res; } my $audit = $rpcenv->check($authuser, '/access', ['Sys.Audit'], 1); @@ -113,6 +114,7 @@ __PACKAGE__->register_method ({ description => "Allow to propagate (inherit) permissions.", type => 'boolean', optional => 1, + default => 1, }, delete => { description => "Remove permissions (instead of adding it).", @@ -139,7 +141,11 @@ __PACKAGE__->register_method ({ my $cfg = cfs_read_file("user.cfg"); - my $propagate = $param->{propagate} ? 1 : 0; + my $propagate = 1; + + if (defined($param->{propagate})) { + $propagate = $param->{propagate} ? 1 : 0; + } foreach my $role (split_list($param->{roles})) { die "role '$role' does not exist\n"