Hi all,
Martijn or somebody else,
Can you please explain me the code below. I don't understand it and it doesn't work the way I want.
<h2><!--#var title_or_id--></h2>
<!--#call "REQUEST.set('allowedVisualData', AUTHENTICATED_USER.hasRole(_.None, ['allowedVisualData']))"-->
If I browse to this page I get the message : this should be a picture.
Where can I set that a user can only enter the page after he's given a password? Or where can I set these user roles? I don't get it. At the moment I haven't set anything and it still allows me to enter the data.
Tia, Tom
Tom - You need to use the has_role method, not hasRole (hasRole is deprecated, and suffered from a poor choice of name, since it was the original name of user.allowed. the name exists solely for b/w compatibility). Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
Brian Lloyd wrote:
You need to use the has_role method, not hasRole (hasRole is deprecated, and suffered from a poor choice of name, since it was the original name of user.allowed. the name exists solely for b/w compatibility).
I am using hasRole so when I saw this I tried changing it to has_roll. But has_roll gives me an error. Is the sytax different? I am using Zope 1.10.2 on RedHat Linux 5.2. <!--#call "REQUEST.set('isManager',AUTHENTICATED_USER.has_role(_.None,['Manager']))"--> PS I stole this from Zope.org a while back. :) Phil A.
participants (2)
-
Brian Lloyd -
Philip Aylesworth