[Zope] New zope feature?

Amos Latteier amos@aracnet.com
Thu, 15 Jul 1999 10:14:58 -0700


At 06:00 PM 7/15/99 +0200, Anders Qvist wrote:
>(Haven't researched this one, so it might have been suggested already.)
>
>What about an DTML directive
>
><!--#role somerole--><!--#/role-->
>
>which would be a specialized if clause, which includes its content only if
>the current caller has the specified role?

You can already do this like so:

<!--#if "AUTHENTICATED_USER.has_role('somerole')"-->
...
<!--#/if-->

You can also test for permissions on objects like so:

<!--#if "AUTTHENTICATED_USER.has_permission('View',someObject)"-->
...
<!--#/if-->

Good luck.

-Amos