From 357deeb864fb596ed5fd7af803c5fce910de9f73 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 18 Nov 2024 16:29:13 +0100 Subject: [PATCH] add 'import' content type to 'check_volume_access' in the same branch as 'vztmpl' and 'iso' Signed-off-by: Dominik Csapak Reviewed-by: Fiona Ebner --- src/PVE/Storage.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm index de730b7..1e12b51 100755 --- a/src/PVE/Storage.pm +++ b/src/PVE/Storage.pm @@ -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)) {