mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-19 06:50:07 +03:00
bug #773: oneadmin can not be deleted
This commit is contained in:
parent
2d59f11854
commit
c447e6e9a3
@ -77,6 +77,14 @@ int UserDelete::drop(int oid, PoolObjectSQL * object, string& error_msg)
|
||||
User * user = static_cast<User *>(object);
|
||||
int group_id = user->get_gid();
|
||||
|
||||
if (oid == 0)
|
||||
{
|
||||
error_msg = "oneadmin can not be deleted.";
|
||||
|
||||
object->unlock();
|
||||
return -1;
|
||||
}
|
||||
|
||||
int rc = pool->drop(object, error_msg);
|
||||
|
||||
object->unlock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user