[Zope] Security: Displaying text based on user permission

Rik Hoekstra hoekstra@fswrul.fsw.leidenuniv.nl
Wed, 23 Jun 1999 09:24:55 +0200


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Michael Wang-Helmke
> Sent: Wednesday, June 23, 1999 2:06 AM
> To: 'zope@zope.org'
> Subject: [Zope] Security: Displaying text based on user permission
>
>
> hi all,
>
> I want to be able to create a dtml page where some of the text is
> only visible to certain Roles of user (Anonymous, Manager, etc).
>
> For example:
>
> <!--#if "user is manager"-->
> super secret text
> <!--#/if-->
>
> I am learning Zope quickly but am still know.  I know Python fairly well.
>
> Any ideas?

Use:

<!--#if "AUTHENTICATED_USER.has_role(['Manager'])"-->
  bla
<!--#/if-->
> thanks,
>
> Michael Wang-Helmke
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>