[Zope] User Roles in ZPT

Paul Winkler pw_lists@slinkp.com
Tue, 13 May 2003 10:11:35 -0400


On Tue, May 13, 2003 at 01:38:48PM -0400, Jamie White wrote:
> What is the proper syntax to determine whether the user has a role using
> zpt.
> ...             ?????????????????????????????????       
> <p tal:omit-tag=???"not:user/has_role/Manager"???
>                 ????????????????????????????????? 

tal path expressions don't allow you to pass arguments, you need
a python expression for that. also, i think what you want is
tal:condition, not tal:omit-tag. try this:

<p tal:condition="python: user.has_role('Manager')" 
 ....

-- 

Paul Winkler
home:  http://www.slinkp.com
"Muppet Labs, where the future is made - today!"