From: Dietmar Maurer Date: Wed, 18 Jan 2017 16:30:40 +0000 (+0100) Subject: use new PVE::Storage::check_volume_access() X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=484d1baa1eb55bffb72cb05c8c5096cbb77023d3;p=pve-manager-legacy.git use new PVE::Storage::check_volume_access() --- 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);