mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #862: Fixes id check in delete authorization method
This commit is contained in:
parent
2af47bf630
commit
c19345db50
@ -32,23 +32,20 @@ bool RequestManagerDelete::delete_authorization(int oid,
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( oid >= 0 )
|
||||
object = pool->get(oid,true);
|
||||
|
||||
if ( object == 0 )
|
||||
{
|
||||
object = pool->get(oid,true);
|
||||
|
||||
if ( object == 0 )
|
||||
{
|
||||
failure_response(NO_EXISTS,
|
||||
get_error(object_name(auth_object),oid),
|
||||
att);
|
||||
return false;
|
||||
}
|
||||
|
||||
object->get_permissions(perms);
|
||||
|
||||
object->unlock();
|
||||
failure_response(NO_EXISTS,
|
||||
get_error(object_name(auth_object),oid),
|
||||
att);
|
||||
return false;
|
||||
}
|
||||
|
||||
object->get_permissions(perms);
|
||||
|
||||
object->unlock();
|
||||
|
||||
AuthRequest ar(att.uid, att.gid);
|
||||
|
||||
ar.add_create_auth(auth_object, "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user