hi: AUTHENTICATED_USER is in REQUEST:
hence you could write ... self.REQUEST.AUTHENTICATED_USER.has_role(self, ["Manager"]) ... regards, juergen herrmann [ [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 > > > > 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 > > _______________________________________________ > 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 ) > _______________________________________________________________________ >> XLhost.de - eXperts in Linux hosting << Juergen Herrmann Weiherweg 10, 93051 Regensburg, Germany Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 ICQ: 27139974 - IRC: [EMAIL PROTECTED] WEB: http://www.XLhost.de _______________________________________________ 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 )