mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 17:10:35 +00:00
backup: add missing user check in update_job
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
This commit is contained in:
parent
ecddd2e231
commit
d5b9f2e1cb
@ -265,6 +265,12 @@ __PACKAGE__->register_method({
|
||||
my $rpcenv = PVE::RPCEnvironment::get();
|
||||
my $user = $rpcenv->get_user();
|
||||
|
||||
foreach my $key (qw(tmpdir dumpdir script)) {
|
||||
raise_param_exc({ $key => "Only root may set this option."})
|
||||
if defined($param->{$key}) && ($user ne 'root@pam');
|
||||
}
|
||||
|
||||
|
||||
if (my $pool = $param->{pool}) {
|
||||
$rpcenv->check_pool_exist($pool);
|
||||
$rpcenv->check($user, "/pool/$pool", ['VM.Backup']);
|
||||
|
Loading…
Reference in New Issue
Block a user