[Zope] Access Rule getUserName problem

2006-08-24 Thread Josh Burvill
Hello,I have this script (see below) set as an access rule for
a folder. When it is run directly it prints out the correct user. But
when it runs indirectly as an access rule (ie when accessing some other
object in the folder, the user is always Anonymous User.
I am using Zope 2.8.6-final, python 2.3.5, win32.I am
using simpleuserfolder and sessioncrumbler in part of the site, but it
also happens with a regular user folder and normal http authentication.Thanks
request=container.REQUESTthe_user=_.SecurityGetUser().getUserName()print the_usercontext.audit_trail_sql(bigbird_user=the_user, \
 request_form=request.form, \ request_url=request['ACTUAL_URL'], \ client_ip=request['REMOTE_ADDR'])return printed
___
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 )


Re: [Zope] Access Rule getUserName problem

2006-08-24 Thread Andreas Jung



--On 24. August 2006 16:16:20 +1000 Josh Burvill [EMAIL PROTECTED] wrote:


Hello,

I have this script (see below) set as an access rule for a folder. When it
is run directly it prints out the correct user. But when it runs
indirectly
as an access rule (ie when accessing some other object in the folder, the
user is always Anonymous User.




Authentication occurs *after* traversal. So the user will never be available
within an accessrule through the traversal phase.

-aj

pgp5JYIajRjZq.pgp
Description: PGP signature
___
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 )