[Zope] newbie : req.AUTHENTICATED_USER

Johan Carlsson [EasyPublisher] johanc@easypublisher.com
Wed, 16 Oct 2002 12:13:45 +0200


At 11:09 2002-10-16 +0200, cyrille said:
>hello,
>another newbie in Zope World ;o)
>
>First question :
>
>I 'm logging in Zope in /manage. I can do what I want, no right problem.
>
>So I do a little Pythno script for learning
>#
>req=3D container.REQUEST
>print "auth user: ", req.AUTHENTICATED_USER,"<br>",
>print "manager property: ", req.AUTHENTICATED_USER.has_permission('Manage=
=20
>Properties', context),"<br>",
>#
>
>when I click in "Test" the result is :
>
>auth user:  Anonymous User <br>
>manager property:  None <br>
>Why it ir "Anonymous" ??? I'm logging has "Cyrille" ......... ;o{


That's funny?
What happens if you change:

   req=3D container.REQUEST

to:

   req=3D context.REQUEST

Regards,
Johan Carlsson


--=20
Torped Strategi och Kommunikation AB
Johan Carlsson
johanc@easypublisher.com

Mail:
Birkagatan 9
SE-113 36  Stockholm
Sweden

Visit:
V=E4stmannagatan 67, Stockholm, Sweden

Phone +46-(0)8-32 31 23
Fax +46-(0)8-32 31 83
Mobil +46-(0)70-558 25 24
http://www.easypublisher.com
http://www.torped.se