]> git.proxmox.com Git - qemu-server.git/commitdiff
use new PVE::Storage::check_volume_access()
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 18 Jan 2017 16:22:34 +0000 (17:22 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 18 Jan 2017 16:23:03 +0000 (17:23 +0100)
PVE/API2/Qemu.pm

index 33b8f5adb2b31b0a54627864b7a3150ba0388809..2c1e2c991e427f061a41b1b6f5772cc4105649ee 100644 (file)
@@ -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);
            }
        }