Previously, the /cluster/replication API handler would fail completely
with a HTTP 403 if a user does have VM.Audit permissions for
a single VM/CT. That was due to the 'noerr' parameter not set for
$rpcenv->check()
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
method => 'GET',
description => "List replication jobs.",
permissions => {
- description => "Requires the VM.Audit permission on /vms/<vmid>.",
+ description => "Will only return replication jobs for which the calling user has"
+ . " VM.Audit permission on /vms/<vmid>.",
user => 'all',
},
parameters => {
foreach my $id (sort keys %{$cfg->{ids}}) {
my $d = $cfg->{ids}->{$id};
my $vmid = $d->{guest};
- next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Audit' ]);
+ next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Audit' ], 1);
$d->{id} = $id;
push @$res, $d;
}