mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-04-28 15:26:36 +00:00
api: backup: refactor backup permission check
Alter style to make the parameter check more concise Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
98cbec545f
commit
c62f096e2b
@ -49,7 +49,7 @@ sub assert_param_permission_common {
|
|||||||
raise_param_exc({ $key => "Only root may set this option."}) if exists $param->{$key};
|
raise_param_exc({ $key => "Only root may set this option."}) if exists $param->{$key};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined($param->{bwlimit}) || defined($param->{ionice}) || defined($param->{performance})) {
|
if (grep { defined($param->{$_}) } qw(bwlimit ionice performance)) {
|
||||||
$rpcenv->check($user, "/", [ 'Sys.Modify' ]);
|
$rpcenv->check($user, "/", [ 'Sys.Modify' ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user