api/resume: make nocheck root-only

this is only used for migration via 'qm mtunnel', regular users should
never need to resume a VM that does not logically belong to the node it
is running on

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2020-04-27 09:19:13 +02:00 committed by Thomas Lamprecht
parent 90ff65b63a
commit 4fb85adc65

View File

@ -2589,6 +2589,8 @@ __PACKAGE__->register_method({
if $skiplock && $authuser ne 'root@pam';
my $nocheck = extract_param($param, 'nocheck');
raise_param_exc({ nocheck => "Only root may use this option." })
if $nocheck && $authuser ne 'root@pam';
my $to_disk_suspended;
eval {