From 989f3c7ead28837f0bb7f0fe1ceaebcca336e713 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 18 Jan 2017 17:30:40 +0100 Subject: [PATCH 1/1] use new PVE::Storage::check_volume_access() --- PVE/API2/VZDump.pm | 2 +- PVE/CLI/pveam.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm index 8767aa2f..448917a8 100644 --- a/PVE/API2/VZDump.pm +++ b/PVE/API2/VZDump.pm @@ -198,7 +198,7 @@ __PACKAGE__->register_method ({ my $authuser = $rpcenv->get_user(); my $storage_cfg = PVE::Storage::config(); - $rpcenv->check_volume_access($authuser, $storage_cfg, undef, $volume); + PVE::Storage::check_volume_access($rpcenv, $authuser, $storage_cfg, undef, $volume); return PVE::Storage::extract_vzdump_config($storage_cfg, $volume); }}); diff --git a/PVE/CLI/pveam.pm b/PVE/CLI/pveam.pm index ef03d258..10511f24 100644 --- a/PVE/CLI/pveam.pm +++ b/PVE/CLI/pveam.pm @@ -126,7 +126,7 @@ __PACKAGE__->register_method ({ my $res = []; foreach my $item (@$vollist) { - eval { $rpcenv->check_volume_access($authuser, $cfg, undef, $item->{volid}); }; + eval { PVE::Storage::check_volume_access($rpcenv, $authuser, $cfg, undef, $item->{volid}); }; next if $@; push @$res, $item; } @@ -168,7 +168,7 @@ __PACKAGE__->register_method ({ my $cfg = PVE::Storage::config(); - $rpcenv->check_volume_access($authuser, $cfg, undef, $template); + PVE::Storage::check_volume_access($rpcenv, $authuser, $cfg, undef, $template); my $abs_path = PVE::Storage::abs_filesystem_path($cfg, $template); -- 2.39.2