1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

feature #687: Redo of commit 2b90f0237700bb5da0ef6603d66dc832cd6abd12

This commit is contained in:
Ruben S. Montero 2011-07-01 18:54:02 +02:00
parent d74b69e4ce
commit a091e52ffb

View File

@ -45,7 +45,6 @@ void RequestManagerPoolInfoFilter::request_execute(xmlrpc_c::paramList const& pa
set<int>::iterator it;
ostringstream oss;
bool empty = true;
ostringstream where_string;
@ -59,6 +58,8 @@ void RequestManagerPoolInfoFilter::request_execute(xmlrpc_c::paramList const& pa
int rc;
AuthRequest::Operation request_op;
// ------------------------------------------
// User ID filter
// ------------------------------------------
@ -74,10 +75,11 @@ void RequestManagerPoolInfoFilter::request_execute(xmlrpc_c::paramList const& pa
case MINE:
uid_filter << "uid = " << uid;
auth_op = AuthRequest::INFO_POOL_MINE;
request_op = AuthRequest::INFO_POOL_MINE;
break;
case ALL:
request_op = AuthRequest::INFO_POOL;
break;
case MINE_GROUP:
@ -89,11 +91,13 @@ void RequestManagerPoolInfoFilter::request_execute(xmlrpc_c::paramList const& pa
where_string << " OR gid = " << *it;
}
auth_op = AuthRequest::INFO_POOL_MINE;
request_op = AuthRequest::INFO_POOL_MINE;
break;
default:
uid_filter << "uid = " << filter_flag;
request_op = AuthRequest::INFO_POOL;
break;
}
@ -180,7 +184,7 @@ void RequestManagerPoolInfoFilter::request_execute(xmlrpc_c::paramList const& pa
// Authorize & get the pool
// ------------------------------------------
if ( basic_authorization(-1) == false )
if ( basic_authorization(-1, request_op) == false )
{
return;
}