[Grok-dev] Re: Local permissions?

Sebastian Ware sebastian at urbantalk.se
Wed Jul 4 05:21:24 EDT 2007


If someone explains security to me, I will be happy to write a mini  
tutorial for newbies (such as myself) :)

Mvh Sebastian

4 jul 2007 kl. 01.02 skrev Luis De la Parra:

> Luis De la Parra wrote:
>> but how do you allow him to only edit his own files? Is there a  
>> way to
>> grant the permission only for certain objects?
>
> ...ok. never mind.
>
> Just doing it the "obvious" way seems to work. I added this lines in
> my "AddForm"
>
> pmanager = IPrincipalPermissionManager( obj ) #obj > content we are  
> creating
> pmanager.grantPermissionToPrincipal('yo.edit', principal.id)
>
> and it does the trick. --only the creator can edit the object--
>
> cheers. luis
>
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list