Re: [Zope] testing for local roles
Brian Lloyd wrote:
<dtml-if "AUTHENTICATED_USER.has_role(('Manager','siteManager'), this())"> ... </dtml-if>
Well, while we're on the subject of AUTHENTICATED_USER.has_role, I've just come upon an error that just popped up all of a sudden in an SQL query that was working fine before. The problematic line is: <dtml-if "AUTHENTICATED_USER.has_role('Manager',this())"> and the error I get when trying to test it is: Error, exceptions.NameError: AUTHENTICATED_USER SQL used: Could not render the query template! The last line of the traceback: File /usr/local/Zope22b4/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval (Object: AUTHENTICATED_USER.has_role('Manager',this())) (Info: this) File <string>, line 0, in ? Another query in the same folder uses the exact same if statement, and works fine. I am running 2.2b4. Can anyone suggest a solution? Thanks, Aaron
participants (1)
-
Aaron Williamson