use new PVE::Storage::check_volume_access()

This commit is contained in:
Dietmar Maurer 2017-01-18 17:30:40 +01:00
parent 8a9bf7771e
commit 989f3c7ead
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}});

View File

@ -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);