]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
use new PVE::Storage::check_volume_access()
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 18 Jan 2017 16:30:40 +0000 (17:30 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 18 Jan 2017 16:30:40 +0000 (17:30 +0100)
PVE/API2/VZDump.pm
PVE/CLI/pveam.pm

index 8767aa2ffa042a074eec78f87cfa0360e2491104..448917a8f15753fb25e106b89a5f0c19ab17a643 100644 (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);
     }});
index ef03d2587733e8f4f853968a704c3a44c00d87d7..10511f247b070382765d5a9f8cf25896e77bac53 100644 (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);