AW: [Zope] Do All Classes Have Default Current Objects? REQUEST.A
Wed, 24 Oct 2001 10:16:09 +0200
>Allmost this works:
> user = container.REQUEST.AUTHENTICATED_USER.getUserName()
REQUEST.AUTHENTICATED_USER method is not advised by the zope documentation:
>From your zope installation\lib\python\PRODUCTS\OFSP\help\dtml-funcs.stx:
SecurityGetUser() -- Return the current user object. This is
normally the same as the 'REQUEST.AUTHENTICATED_USER'
object. However, the 'AUTHENTICATED_USER' object is insecure since
it can be replaced.
>From the book chapter 6, performing security checks:
You can retrieve the currently logged in user with the SecurityGetUser
However, i was not able to use this function from within a pythonscript.
I am sure somebody else can do that, i am interested in the solution, so if
you have one...
Met vriendelijke groeten,
Hans de Wit
Stichting Farmaceutische Kengetallen
2500 GL DEN HAAG