mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
feature #203: Better public in Allocate Methods
This commit is contained in:
parent
0dbb3330fe
commit
498102b786
@ -77,12 +77,17 @@ void RequestManager::ImageAllocate::execute(
|
||||
{
|
||||
AuthRequest ar(uid);
|
||||
string t64;
|
||||
string pub;
|
||||
string pub_name = "PUBLIC";
|
||||
|
||||
img_template->get(pub_name, pub);
|
||||
transform (pub.begin(), pub.end(), pub.begin(),(int(*)(int))toupper);
|
||||
|
||||
ar.add_auth(AuthRequest::IMAGE,
|
||||
img_template->to_xml(t64),
|
||||
AuthRequest::CREATE,
|
||||
uid,
|
||||
false);
|
||||
(pub == "YES"));
|
||||
|
||||
if (UserPool::authorize(ar) == -1)
|
||||
{
|
||||
|
@ -77,12 +77,17 @@ void RequestManager::VirtualNetworkAllocate::execute(
|
||||
{
|
||||
AuthRequest ar(uid);
|
||||
string t64;
|
||||
string pub;
|
||||
string pub_name = "PUBLIC";
|
||||
|
||||
vn_template->get(pub_name, pub);
|
||||
transform (pub.begin(), pub.end(), pub.begin(),(int(*)(int))toupper);
|
||||
|
||||
ar.add_auth(AuthRequest::NET,
|
||||
vn_template->to_xml(t64),
|
||||
AuthRequest::CREATE,
|
||||
uid,
|
||||
false);
|
||||
(pub == "YES"));
|
||||
|
||||
if (UserPool::authorize(ar) == -1)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user