[Zope] [python script] problem with AUTHENTICATED_USER
BonviciniJ at keops.net
BonviciniJ at keops.net
Wed Apr 20 10:30:34 EDT 2005
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
but Zope displays me an error:
Error Type: NameError
Error Value: global name 'AUTHENTICATED_USER' is not defined
I don't know what is the problem.
I use sessionUserFolder (a Zope products), so I think it could be the reason of the problem.
Thank you for your help
More information about the Zope
mailing list