[Zope-PTK] Displaying something based on role doesn't work properly

Alexander Limi alexander@limi.net
Thu, 8 Feb 2001 20:49:45 +0100


I tried sending this to the zope list, but got no answers. I thought I'd
try the PTK list too, as you guys probably are more clued in to how
Loginmanager works :)

So, here we go:

----- Original Message -----
From: "Alexander Limi" <alexander@limi.net>
To: <zope@zope.org>
Sent: Wednesday, February 07, 2001 5:29 PM
Subject: Displaying something based on role doesn't work properly


> Hi,
>
> I'm running LoginManager with cookie-based authentication on my site,
> and I use the following piece of dtml to show a particular menu in the
> header of a page if a user has a particular role:
>
> <dtml-if "AUTHENTICATED_USER.has_role(['SomeRole'])">
> [menu]
> </dtml-if>
>
> It works fine, except for one document: standard_error_message. When I
try
> to access a page on my site that doesn't exist, the menu is not shown
in
> the header anymore. This is not the way I want it.
>
> I thought this may be because it was a publicly viewable document, and
> required no authentication, but all of my other publicly available
> documents preserve the menu just fine.
>
> Any suggestions to what I'm doing wrong or not taking into
> consideration?
>
> Thanks in advance,
>
>
> Alexander.
>
>