mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-03-11 16:58:28 +03:00
add 'import' content type to 'check_volume_access'
in the same branch as 'vztmpl' and 'iso' Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
974081ce15
commit
357deeb864
@ -542,7 +542,7 @@ sub check_volume_access {
|
||||
|
||||
return if $rpcenv->check($user, "/storage/$sid", ['Datastore.Allocate'], 1);
|
||||
|
||||
if ($vtype eq 'iso' || $vtype eq 'vztmpl') {
|
||||
if ($vtype eq 'iso' || $vtype eq 'vztmpl' || $vtype eq 'import') {
|
||||
# require at least read access to storage, (custom) templates/ISOs could be sensitive
|
||||
$rpcenv->check_any($user, "/storage/$sid", ['Datastore.AllocateSpace', 'Datastore.Audit']);
|
||||
} elsif (defined($ownervm) && defined($vmid) && ($ownervm == $vmid)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user