api: vzdump: extract config: add content type check

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2022-03-30 12:24:35 +02:00 committed by Fabian Grünbichler
parent 0782c03469
commit c53d5c5ec1

View File

@ -267,7 +267,14 @@ __PACKAGE__->register_method ({
my $authuser = $rpcenv->get_user();
my $storage_cfg = PVE::Storage::config();
PVE::Storage::check_volume_access($rpcenv, $authuser, $storage_cfg, undef, $volume);
PVE::Storage::check_volume_access(
$rpcenv,
$authuser,
$storage_cfg,
undef,
$volume,
'backup',
);
if (PVE::Storage::parse_volume_id($volume, 1)) {
my (undef, undef, $ownervm) = PVE::Storage::parse_volname($storage_cfg, $volume);