From: Dietmar Maurer Date: Wed, 18 Jan 2017 16:22:34 +0000 (+0100) Subject: use new PVE::Storage::check_volume_access() X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=9bb3acf15515c2f89eeaffd769cc066ad6765210;p=qemu-server.git use new PVE::Storage::check_volume_access() --- diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 33b8f5a..2c1e2c9 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -60,7 +60,7 @@ my $check_storage_access = sub { die "no storage ID specified (and no default storage)\n" if !$storeid; $rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']); } else { - $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid); + PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, $vmid, $volid); } }); }; @@ -157,7 +157,7 @@ my $create_disks = sub { $res->{$ds} = PVE::QemuServer::print_drive($vmid, $disk); } else { - $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $volid); + PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, $vmid, $volid); my $volid_is_new = 1; @@ -474,7 +474,7 @@ __PACKAGE__->register_method({ die "pipe requires cli environment\n" if $rpcenv->{type} ne 'cli'; } else { - $rpcenv->check_volume_access($authuser, $storecfg, $vmid, $archive); + PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, $vmid, $archive); $archive = PVE::Storage::abs_filesystem_path($storecfg, $archive); } }