hi, I'm having a problem with Authentication. I can't seem to get anything but Anonymous User from user/getRoles or user/Getusername in a ZPT. Even if I create a new ZPT in the Root folder 'when I am loged on as manager', then 'test' the page I get Anon User. My only line is: <p tal:content="user/getUserName">roles</p> I'm using a very current version of Zope and Mozilla Firebird. Note the ZMI seems to know how I am just fine. Tells me 'Loged in as jason' on the blue bar at the top. j.
Even if I create a new ZPT in the Root folder 'when I am loged on as manager', then 'test' the page I get Anon User.
My only line is: <p tal:content="user/getUserName">roles</p>
I'm using a very current version of Zope and Mozilla Firebird.
This is a FAQ, did you search the list archive? HTTP is stateless; every request for privileged data begins with a request from the client without auth creds. If the requested resource is protected the server responds with a 401, *then* the browser repeats the request with the creds. Assumption of protected resources is permitted in certain situations, but it shouldn't be relied upon. Read rfc2617 if you want to know more. -- Jamie Heilman http://audible.transient.net/~jamie/ "I was in love once -- a Sinclair ZX-81. People said, "No, Holly, she's not for you." She was cheap, she was stupid and she wouldn't load -- well, not for me, anyway." -Holly
participants (2)
-
Jamie Heilman -
Jason C. Leach