PVE::Storage: new helper check_volume_access()

Copied from PVE::RPCEnvironment to avoid cyclic dependency
(pve-storgae => pve-access-control => pve-storage).
This commit is contained in:
Dietmar Maurer
2017-01-18 17:14:07 +01:00
parent ef881e10eb
commit 04a13668b9
3 changed files with 29 additions and 3 deletions

View File

@ -86,7 +86,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);
my $config_raw = PVE::Storage::extract_vzdump_config($storage_cfg, $volume);