only raise exception when parameter -force is set

This commit is contained in:
Dietmar Maurer 2011-11-17 13:36:56 +01:00
parent c274d9f9f5
commit a591eebacb

View File

@ -1224,7 +1224,8 @@ __PACKAGE__->register_method({
my $vmid = extract_param($param, 'vmid'); my $vmid = extract_param($param, 'vmid');
raise_param_exc({ force => "Only root may use this option." }) if $user ne 'root@pam'; raise_param_exc({ force => "Only root may use this option." })
if $param->{force} && $user ne 'root@pam';
# test if VM exists # test if VM exists
PVE::QemuServer::load_config($vmid); PVE::QemuServer::load_config($vmid);