diff --git a/include/AuthRequest.h b/include/AuthRequest.h index 44623d92de..13e48f24c7 100644 --- a/include/AuthRequest.h +++ b/include/AuthRequest.h @@ -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); } /** diff --git a/src/rm/RequestManagerVMTemplate.cc b/src/rm/RequestManagerVMTemplate.cc index 5bae71254a..5f0952f115 100644 --- a/src/rm/RequestManagerVMTemplate.cc +++ b/src/rm/RequestManagerVMTemplate.cc @@ -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);