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
> [email protected]
> http://mail.zope.org/mailman/listinfo/zope3-users
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users