[Zope] Hide from authenticated users

John Ziniti jziniti at speakeasy.org
Fri Oct 10 16:34:45 EDT 2003


Eric Merritt wrote:
> I have a little registration area that should be
> hidden from authenticated users (only accessable to
> anonymous). However, I can't seem to get this to work,
> the anonymous only always shows if someone is
> authenticated. Basically, I set the 'access content'
> and view permision to anonymous. Authenticated access
> only areas seem to work fine, I am a bit confused at
> this point.

Authenticated users usually also have the role of
"Anonymous".  Although this is configurable for some
types of acl_users, you really *need* to have that
role or many things will break.  To enforce your
business logic in this case, you will have to do
some checking (in page templates, or DTML, or python),
and only show something if the AUTHENTICATED_USER.getRoles()
does *not* include "Authenticated".  I don't think
there's an automatic way to do this.

HTH,
JZ




More information about the Zope mailing list