From c92c54d54b1cbbc14cd96a949d0c40290a2049da Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 28 Jun 2019 20:04:04 +0200 Subject: [PATCH] api: backup pool: enforce VM.Backup permissions on pool also on create Signed-off-by: Thomas Lamprecht --- PVE/API2/Backup.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm index 87781ecc..ec6b4541 100644 --- a/PVE/API2/Backup.pm +++ b/PVE/API2/Backup.pm @@ -270,6 +270,12 @@ __PACKAGE__->register_method({ 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']); + } + + my $create_job = sub { my $data = cfs_read_file('vzdump.cron'); -- 2.39.2