1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-19 06:50:07 +03:00

Feature #687: AuthRequest::add_auth extracts the object int id only if it is not a string template

This commit is contained in:
Carlos Martín 2011-06-28 11:43:14 +02:00
parent 99088df9b5
commit 2da4877c8c

View File

@ -39,6 +39,8 @@ void AuthRequest::add_auth(Object ob,
ostringstream oss;
bool auth;
int ob_id_int = 0;
oss << Object_to_str(ob) << ":";
if (op == CREATE || op == INSTANTIATE) //encode the ob_id, it is a template
@ -58,6 +60,9 @@ void AuthRequest::add_auth(Object ob,
else
{
oss << ob_id << ":";
istringstream iss(ob_id);
iss >> ob_id_int;
}
oss << Operation_to_str(op) << ":";
@ -79,11 +84,6 @@ void AuthRequest::add_auth(Object ob,
int ob_gid = 0;
istringstream iss(ob_id);
int ob_id_int;
iss >> ob_id_int;
Nebula& nd = Nebula::instance();
AclManager* aclm = nd.get_aclm();