mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
bug #4496: Do not allow to change ownership for VMs in DONE
This commit is contained in:
parent
320e58eacc
commit
36d48bfe1f
@ -48,7 +48,18 @@ PoolObjectSQL * RequestManagerChown::get_and_quota(
|
||||
|
||||
if (auth_object == PoolObjectSQL::VM)
|
||||
{
|
||||
tmpl = (static_cast<VirtualMachine*>(object))->clone_template();
|
||||
VirtualMachine * vm = static_cast<VirtualMachine*>(object);
|
||||
|
||||
if ( vm->get_state() == VirtualMachine::DONE )
|
||||
{
|
||||
vm->unlock();
|
||||
|
||||
att.resp_msg = "Could not change VM ownership, wrong state";
|
||||
failure_response(ACTION, att);
|
||||
return 0;
|
||||
}
|
||||
|
||||
tmpl = vm->clone_template();
|
||||
qtype = Quotas::VIRTUALMACHINE;
|
||||
}
|
||||
else if (auth_object == PoolObjectSQL::IMAGE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user