[Zope] Hide from authenticated users
BZ
bz at bwanazulia.com
Fri Oct 10 16:46:41 EDT 2003
Take a look at the "join_form" in CMF. It has a line...
<dtml-if "portal_membership.getAuthenticatedMember().has_role('Member')">
</dtml-if>
You can also check to see if they are logged in...
BZ
--
http://www.zopezone.com
http://www.bluewildfire.com
> 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
>
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
More information about the Zope
mailing list