[Zope] Requesting AUTHENTICATED_USER from within Python script?

Dieter Maurer dieter@handshake.de
Wed, 26 Sep 2001 22:01:19 +0200 (CEST)


olpa@sybcom.de writes:
 > Blame me if this is already answered:
 > 
 > how to check if current role is Manager and how is the name of the
 > authenticated user from within a Script (Python)... i.e. how to do
 > AUTHENTICATED.has_role('Manager') and AUTHENTICATED_USER.getUserName()
 > without passing AUTHENTICATED as argument.
AUTHENTICATED_USER is a REQUEST member....

Thus, you can use "container.REQUEST.AUTHENTICATED_USER".


Dieter