mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 07:03:23 +00:00
use new PVE::Storage::check_volume_access()
This commit is contained in:
parent
8a9bf7771e
commit
989f3c7ead
@ -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);
|
||||
}});
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user