[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Appendix B: API Reference

webmaster@zope.org webmaster@zope.org
Tue, 19 Nov 2002 02:35:01 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixB.stx#2-15

---------------

    This interface needs to be supported by objects that
    are returned by user validation and used for access control.

      % Anonymous User - July 12, 2002 3:32 pm:
       i don't seem to be able to access these methods from DTML...
       example?

      % Anonymous User - Sep. 16, 2002 6:27 am:
       for eg:
       <dtml-var "AUTHENTICATED_USER.getId()">returns zope user id
       <dtml-var "AUTHENTICATED_USER.getUserName()">return user name
       <dtml-var "AUTHENTICATED_USER.has_role('Manager')"> returned 1
       <dtml-var "AUTHENTICATED_USER.getRoles()"> returned 'Manager','Authenticated'
       <dtml-var "AUTHENTICATED_USER.getRolesInContext('folder_name')"> 'Manager','Authenticated'
       <dtml-var "AUTHENTICATED_USER.getDomains()"> returned empty ()

      % Anonymous User - Oct. 3, 2002 9:26 am:
       But the class is named AuthenticatedUser.  Why is it referenced with a different
       spelling (i.e. AUTHENTICATED_USER)?

      % Anonymous User - Oct. 10, 2002 10:05 am:
       Presumably AUTHENTICATED_USER is the property of the HTML request object (i.e., REQUEST), which might be made
       clearer in the statement above about "supported by objects that are returned by user validation..."?

      % mcdonc - Nov. 19, 2002 2:34 am:
       See http://www.zope.org/Members/michel/Projects/Interfaces/DTMLSecurityAPI for the DTML security API.