1
0
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:
Ruben S. Montero 2011-08-30 18:40:08 +02:00
parent 2d59f11854
commit c447e6e9a3

View File

@ -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();