[Zope3-Users] Check permissions
Rupert Redington
rupert at neontribe.co.uk
Fri Mar 17 08:34:07 EST 2006
from zope.security.management import checkPermission
if checkPermission('zope.ManageContent', self.context):
""" ... """
Cheers,
Rupert
Frank Burkhardt wrote:
> Hi,
>
> how can I test, if the current principal (e.g. by being member in a special
> group) has a given permission on a given content object?
>
> Maybe something like this:
>
> if 'zope.ManageContent' in self.context.permissions():
> """..."""
>
> This should include all permission defined in ZCML *and* all permission
> granted in ZMI.
>
> Thank you for all hints.
>
> Regards,
>
> Frank
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
More information about the Zope3-users
mailing list