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

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to