restore: early check cloud init target AllocateSpace permission

Originally-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-02-24 13:21:55 +01:00
parent 62af60cd3d
commit 9f8ba326ce

View File

@ -6272,6 +6272,9 @@ my $parse_backup_hints = sub {
die "Content type 'images' is not available on storage '$storeid'\n"
if !$scfg->{content}->{images};
$rpcenv->check($user, "/storage/$storeid", ['Datastore.AllocateSpace'])
if $user ne 'root@pam';
$virtdev_hash->{$virtdev} = {
format => $format,
storeid => $storeid,