1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

feature #687: oneadmin user and group can use any host

This commit is contained in:
Ruben S. Montero 2011-07-05 17:23:08 +02:00
parent 5801e9c53e
commit 3ff70fabbe
2 changed files with 18 additions and 6 deletions

View File

@ -41,6 +41,11 @@ public:
return oid;
};
int get_gid()
{
return gid;
};
set<int> get_groups()
{
return group_ids;

View File

@ -350,12 +350,19 @@ void Scheduler::match()
{
set<int> groups = user->get_groups();
matched = acls->authorize(uid,
groups,
AuthRequest::HOST,
host->get_hid(),
-1,
AuthRequest::USE);
if ( uid == 0 || user->get_gid() == 0 )
{
matched = true;
}
else
{
matched = acls->authorize(uid,
groups,
AuthRequest::HOST,
host->get_hid(),
-1,
AuthRequest::USE);
}
}
else
{