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

Feature : Use add_create_auth for the merged template

This commit is contained in:
Carlos Martín 2013-02-18 16:44:38 +01:00
parent b5c31213ee
commit ae5561c27e
2 changed files with 6 additions and 7 deletions

@ -85,16 +85,16 @@ public:
* OBJECT:<-1|OBJECT_TMPL_XML64>:CREATE:UID:AUTH
*
* @param type of the object to be created
* @param template (base64 encoded) of the new object
* @param txml template of the new object
*/
void add_create_auth(PoolObjectSQL::ObjectType type, const string& txml_64)
void add_create_auth(PoolObjectSQL::ObjectType type, const string& txml)
{
PoolObjectAuth perms; //oid & gid set to -1
perms.uid = uid;
perms.obj_type = type;
add_auth(AuthRequest::CREATE, perms, txml_64);
add_auth(AuthRequest::CREATE, perms, txml);
}
/**

@ -183,12 +183,11 @@ void VMTemplateInstantiate::request_execute(xmlrpc_c::paramList const& paramList
if (!str_uattrs.empty())
{
PoolObjectAuth tmp_perms;
string tmpl_str;
perms.uid = att.uid;
perms.obj_type = auth_object;
tmpl->to_xml(tmpl_str);
ar.add_auth(AuthRequest::CREATE, tmp_perms); //CREATE TEMPLATE
ar.add_create_auth(auth_object, tmpl_str); // CREATE TEMPLATE
}
VirtualMachine::set_auth_request(att.uid, ar, tmpl);