[Zope] problem testing for a permission
   
    Jerome Alet
     
    alet@unice.fr
       
    Thu, 19 Apr 2001 23:01:42 +0200
    
    
  
Hi,
I've created a method whose View permission is not allowed to
Anonymous users but allowed to the "Member" role.
I want to put a link to this method at the bottom of each page, say
in standard_html_footer, but only if the user is allowed to view it.
I've done the following in standard_html_footer:
<dtml-if "AUTHENTICATED_USER.has_permission('View', mymethod)">
  ...
  Some tests and text
  ...
  <A HREF="<dtml-var URL>/mymethod">Members only</A>
  ...
  Some tests and text
  ...
</dtml-if>
but if I access the pages as an anonymous user then I've got
an Unauthorized exception instead of not having the "Members only" link.
What do I have done wrong ?
Thanks in advance.
Jerome Alet