1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Feature #862: 'one* list g' shows by default public resources in the user's group, instead of any resource in the group

This commit is contained in:
Carlos Martín 2011-12-07 13:07:15 +01:00
parent f7d48627ee
commit 1b02cf8136

View File

@ -108,8 +108,19 @@ void RequestManagerPoolInfoFilter::request_execute(
{
vector<int>::iterator it;
uid_filter << "uid = " << att.uid << " OR "
<< "gid = " << att.gid;
// Default rights: Users can see and use their resources, and
// the public ones in their group
uid_filter << "uid = " << att.uid << " OR ";
// VMs don't have public column
if ( auth_object == AuthRequest::VM )
{
uid_filter << "gid = " << att.gid;
}
else
{
uid_filter << "(gid = " << att.gid << " AND public = 1)";
}
for ( it=oids.begin(); it< oids.end(); it++ )
{