Commit 3677cf2c authored by Dietmar Maurer's avatar Dietmar Maurer

check storage permissions on vzdump API

parent 705ac953
......@@ -23,7 +23,7 @@ __PACKAGE__->register_method ({
method => 'POST',
description => "Create backup.",
permissions => {
description => "The user needs VM.Backup permissions on any VM.",
description => "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage.",
user => 'all',
},
protected => 1,
......@@ -108,6 +108,9 @@ __PACKAGE__->register_method ({
if defined($param->{$key}) && ($user ne 'root@pam');
}
$rpcenv->check($user, "/storage/$param->{storage}", [ 'Datastore.AllocateSpace' ])
if $param->{storage};
my $vzdump = PVE::VZDump->new($cmdline, $param, $skiplist);
my $worker = sub {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment