--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()


Attachment: pgp66uBdPyIaN.pgp
Description: PGP signature

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to