RE: [Zope] permission and role questions
-----Original Message----- From: Rob Page [mailto:rob.page@digicool.com] Sent: Thursday, April 15, 1999 11:02 AM To: 'Keith Rohrer' Cc: 'zope@zope.org' Subject: RE: [Zope] permission and role questions
Keith:
I can answer some of the more basic questions -- you ask some toughies so I'm hopeful others can add some insight.
1) How does one examine the logged-in user's username from DTML? I think I just need the variable name here...
<!--#var AUTHENTICATED_USER.getUserName()-->
I hate to call ya out on this one Rob, but 1) in order for the above DTML to work it must be quoted (because it's an expression) and even the quoted form: <!--#var "AUTHENTICATED_USER.getUserName()"--> is equivilent to: <!--#var AUTHENTICATED_USER-->
<UL> <LI><A HREF="PublicRoom">Public Room</A></LI>
<!--#if AUTHENTICATED_USER.has_role('Room1Group')--> <LI><A HREF="Room1">Room 1</A></LI> <!--#/if-->
<!--#if AUTHENTICATED_USER.has_role('Room2Group')--> <LI><A HREF="Room2">Room 2</A></LI> <!--#/if-->
</UL>
You will need to quote all of these too.
participants (1)
-
Michel Pelletier