[Zope3-Users] Re: Check permissions

Philipp von Weitershausen philipp at weitershausen.de
Sat Mar 18 04:43:19 EST 2006


Thierry FLORAC wrote:
>   Hi,
> 
> I think that you can also use something like this :
> 
>         from zope.security.management import getInteraction
>         
>         def checkPermission(object, permission='zope.ManageContent'):
>             interaction = getInteraction()
>             return interaction.checkPermission(permission, object)
> 
> I don't know what's the difference between the two methods, and so I
> don't if one of them is better than the other one...

They're exactly the same. zope.security.checkPermission defers to
getInteraction().checkPermission.

Philipp



More information about the Zope3-users mailing list