[Zope] AUTHENTICATED_USER, and what you can do with it.

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Wed, 03 Mar 1999 09:20:50 +1100


Note that this snippet: 


> <!--#if "AUTHENTICATED_USER.getRoles()"-->
>   You have the following roles:
> 
>   <!--#in "AUTHENTICATED_USER.getRoles()"-->
>     <LI><!--#var sequence-item-->
>   <!--#/in-->
> <!--#else-->
>   You have no roles defined.
> <!--#/if-->

can also be written:

 <!--#in "AUTHENTICATED_USER.getRoles()"-->
   <!--#if sequence-start-->
      You have the following roles:
   <!--#/if-->
   <LI><!--#var sequence-item-->
 <!--#else-->
   You have no roles defined.
 <!--#/in-->

That is, #in can have an #else clause, which is called when the
sequence is zero length. I find this easier to read (particularly
when the expression to generate the sequence is large.)

Anthony

Anthony