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:
parent
5801e9c53e
commit
3ff70fabbe
@ -41,6 +41,11 @@ public:
|
||||
return oid;
|
||||
};
|
||||
|
||||
int get_gid()
|
||||
{
|
||||
return gid;
|
||||
};
|
||||
|
||||
set<int> get_groups()
|
||||
{
|
||||
return group_ids;
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user