> Is
> <dtml-if "AUTHENTICATED_USER.has_role('Manager','siteManager')">
> ....
> </dtml-if>
> valid for local roles? siteManager is a local role.
> It seems that if I use this and there is a user with a local
> role present
> nothing is displayed.
> I'm wondering if there is a has_localrole(....) method of
> AUTH..._USER but
> I haven't been able to find it.
Aaron,
The has_role method of User objects can take an optional
second argument, which is the object to use as context
(to take local roles into account). Note also that you
need to pass the list of roles in as sequence. The
following should do what you expect:
<dtml-if "AUTHENTICATED_USER.has_role(('Manager','siteManager'),
this())">
...
</dtml-if>
Brian Lloyd [EMAIL PROTECTED]
Software Engineer 540.371.6909
Digital Creations http://www.digicool.com
_______________________________________________
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )