0001-Feature-687-Add-the-group-of-new-objects-to-be-creat.patch
src/rm/RequestManagerAllocate.cc | ||
---|---|---|
33 | 33 |
AuthRequest ar(uid, group_ids); |
34 | 34 | |
35 | 35 |
if ( tmpl == 0 ) |
36 |
{
|
|
37 |
ar.add_auth(auth_object,-1,-1,auth_op,uid,false);
|
|
36 |
{ |
|
37 |
ar.add_auth(auth_object,-1,gid,auth_op,uid,false);
|
|
38 | 38 |
} |
39 | 39 |
else |
40 | 40 |
{ |
41 | 41 |
string t64; |
42 | 42 | |
43 |
ar.add_auth(auth_object,tmpl->to_xml(t64),-1,auth_op,uid,false); |
|
43 |
// TODO: gid of the new object is not the user's gid for new Users |
|
44 |
ar.add_auth(auth_object,tmpl->to_xml(t64),gid,auth_op,uid,false); |
|
44 | 45 |
} |
45 | 46 | |
46 | 47 |
if (UserPool::authorize(ar) == -1) |
... | ... | |
68 | 69 | |
69 | 70 |
VirtualMachineTemplate * ttmpl = static_cast<VirtualMachineTemplate *>(tmpl); |
70 | 71 | |
71 |
ar.add_auth(auth_object,tmpl->to_xml(t64),-1,auth_op,uid,false);
|
|
72 |
ar.add_auth(auth_object,tmpl->to_xml(t64),gid,auth_op,uid,false);
|
|
72 | 73 | |
73 | 74 |
VirtualMachine::set_auth_request(uid, ar, ttmpl); |
74 | 75 |
src/rm/RequestManagerVirtualMachine.cc | ||
---|---|---|
59 | 59 | |
60 | 60 |
ar.add_auth(AuthRequest::IMAGE, |
61 | 61 |
tmpl->to_xml(t64), |
62 |
-1,
|
|
62 |
gid,
|
|
63 | 63 |
AuthRequest::CREATE, |
64 | 64 |
uid, |
65 | 65 |
false); |
66 |
- |