[Zope] Wrong roles returned?

Christoph Landwehr chris-zopemailing at gmx.de
Tue Mar 9 11:30:13 EST 2004


Hi,

I have two (sets of) DTML-Documents:

Document A has 'View' access for 'anonymous'
Document B has 'View' access for 'Authenticated'

Both use the same standard_html_header:

--- snip ---
<dtml-if "AUTHENTICATED_USER.has_role('Authenticated',this())"">
    You are worthy ...
<dtml-else
    Go away!
</dtml-if>
    Your role:  <dtml-var "AUTHENTICATED_USER.getRoles()">
    Your login: <dtml-var "AUTHENTICATED_USER.getUserName()">
--- /snip ---

When a user views document B, he has to log in and gets the message:
   You are worthy ...
   Your role:  My_Role
   Your login: My_Name

Then he/she viewes document A:
   Go away!
   Your role:  Anonymous
   Your login: Anonymous User

When the User goes back to a B-type document he/she is authenticated again.

Why doesen't Zope return the basic authentication information for the pages that 
  can be viewed as anonymous? How do I get the "real" role?

Regards
Christoph


PS.: FYI
- Zope 2.6.2 (source with python 2.1)
- OS: Linux
- using Zope-webserver (for development only)




More information about the Zope mailing list