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

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

No files matched your search

+5
View File
@@ -41,6 +41,11 @@ public:
return oid;
};
int get_gid()
{
return gid;
};
set<int> get_groups()
{
return group_ids;
+13 -6
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
{