mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-29 18:50:08 +03:00
Feature #1697: Use add_create_auth for the merged template
This commit is contained in:
parent
b5c31213ee
commit
ae5561c27e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user