followup: improve comment
while the commit message tells it nicely a comment should add additional info for people just giving this a quick look Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -399,7 +399,7 @@ sub check_volume_access {
|
|||||||
if ($sid) {
|
if ($sid) {
|
||||||
my ($vtype, undef, $ownervm) = parse_volname($cfg, $volid);
|
my ($vtype, undef, $ownervm) = parse_volname($cfg, $volid);
|
||||||
if ($vtype eq 'iso' || $vtype eq 'vztmpl') {
|
if ($vtype eq 'iso' || $vtype eq 'vztmpl') {
|
||||||
# at least read access to storage
|
# require at least read access to storage, (custom) templates/ISOs could be sensitive
|
||||||
$rpcenv->check_any($user, "/storage/$sid", ['Datastore.AllocateSpace', 'Datastore.Audit']);
|
$rpcenv->check_any($user, "/storage/$sid", ['Datastore.AllocateSpace', 'Datastore.Audit']);
|
||||||
} elsif (defined($ownervm) && defined($vmid) && ($ownervm == $vmid)) {
|
} elsif (defined($ownervm) && defined($vmid) && ($ownervm == $vmid)) {
|
||||||
# we are owner - allow access
|
# we are owner - allow access
|
||||||
|
|||||||
Reference in New Issue
Block a user