Hi,<br><br>This doesn't works. <br><br>As I am not able to restrict the content to be user_id based.<br><br>Need to do some code changes in get_all function.<br><br>Regards,<br>Vaibhav<br><blockquote><br>---------- Original message ----------<br>From:"Eoghan Glynn"< eglynn@redhat.com ><br>Date: 26 Mar 13 20:29:46<br>Subject: Re: [rhos-list] Control Access to instance termination<br>To: Kumar Vaibhav <vaibhav.k.agarwal@in.com><br>Cc: rhos-list <rhos-list@redhat.com><br><br><br><br>> > Hi,<br>> > <br>> > Thanks for the help.<br>> > This seems to solve one part of my problem of changing the state of<br>> > the instance.<br>> > A user cannot delete the other users' instance.<br>> <br>> Great.<br>>  <br>> > However the listing problem still continues to exist. I checked the<br>> > logs and found that get_all access control is possible by using the<br>> > policy.json. But get_all function itself uses t
 he filter of<br>> > 'project_id' from the context. So other part seems to be difficult.<br>> <br>> I'm sure I see the problem here, as nova.compute.api.API.get_all<br><br>s/I'm sure/I'm not sure/<br><br>> bases its policy enforcement check on a target that includes both<br>> the project_id *and* user_id:<br>> <br>>   <a href="https://github.com/openstack/nova/blob/stable/folsom/nova/compute/api.py#L1116" target="_blank">https://github.com/openstack/nova/blob/stable/folsom/nova/compute/api.py#L1116</a><br>> <br>> So it seems to me that a rule based on user_id would be applicable<br>> in this case also. Again I've just done a quick test against master,<br>> please let me know if the behavior you're seeing with your version<br>> of RHOS is different.<br>> <br>> Cheers,<br>> Eoghan<br>> <br>>  <br>> > Regards,<br>> > Vaibhav<br>> > <br>> > ---------- Original message ----------<br>> >
  <br>> > <br>> > From:"Eoghan Glynn"< eglynn@redhat.com ><br>> > Date: 25 Mar 13 22:08:26<br>> > Subject: Re: [rhos-list] Control Access to instance termination<br>> > To: Kumar Vaibhav <vaibhav.k.agarwal@in.com><br>> > Cc: rhos-list <rhos-list@redhat.com><br>> > <br>> > <br>> > <br>> > > or using the older syntax:<br>> > > <br>> > > [["role:admin"], ["role:project_admin",<br>> > > "project_id:%(project_id)s"]], ["user_id:%(user_id)s"]]<br>> > <br>> > Typo:<br>> > <br>> > [["role:admin"], ["role :project_admin",<br>> > "project_id:%(project_id)s"], ["user_id:%(user_id)s"]]<br>> > <br>> > <br>> > <br>> > <br>> > Get Yourself a cool, short @in.com Email ID now!<br>> <br>> _______________________________________________<br>> rhos-list mailing list<br>> rhos-list@redhat.com<br>> <a href="https://
 www.redhat.com/mailman/listinfo/rhos-list" target="_blank">https://www.redhat.com/mailman/listinfo/rhos-list</a><br>> <br></blockquote><br><br><div style="border-top:1px dashed #ccc; border-bottom:1px dashed #ccc; padding:5px;"><a href="http://www3.in.com/sso/commonregister.php?ref=IN&utm_source=invite&utm_medium=outgoing" style="font:13px arial; color:#1E56A1; text-decoration:none;">Get Yourself a cool, short <b>@in.com</b> Email ID now!</a></div>