Requesting AUTHENTICATED_USER from within Python script?
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. Is this in context ? --- If you couldn't find any weirdness, maybe we'll just have to make some! -- Calvin --- Oliver Pabst .-------------------------. mailto:olpa@sybcom.de : : phone :+49 681 56600600 : project department : SYBCOM GmbH fax :+49 681 56600660 : : http://www.sybcom.de
----- Original Message ----- From: <olpa@sybcom.de> To: <zope@zope.org> Sent: Wednesday, September 26, 2001 5:18 PM Subject: [Zope] Requesting AUTHENTICATED_USER from within Python script?
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.
Is this in context ?
Yep, it is part of REQUEST, which is available via context, e.g. "context.REQUEST.AUTHENTICATED_USER.has_role('Manager')" would work Joachim
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
On Wed, 26 Sep 2001, Dieter Maurer wrote:
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
danke! werde ich versuchen!
participants (4)
-
Dieter Maurer -
Joachim Werner -
olpa@mx.sybcom.de -
olpa@sybcom.de