--On Mittwoch, 20. April 2005 16:30 Uhr +0200 [EMAIL PROTECTED] wrote:
I have problem with my python script. I want to check if a user has a the "manager" role, and add an option in a menu in this case Here is my script:
for el in rep.objectValues('Folder'): if el.id=="Administration" and AUTHENTICATED_USER.has_role(self, ["Manager"]): #add option to the menu
The recommended way to determine the current user is:
from AccessControl import getSecurityManager() user = getSecurityManager().getUser()
-aj
pgp66uBdPyIaN.pgp
Description: PGP signature
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )