[Zope-CMF] checking for local role
Tres Seaver
tseaver@zope.com
24 Jul 2002 17:00:45 -0400
On Wed, 2002-07-24 at 15:52, Bryan C. Andregg wrote:
> I've tried several variations of:
>
> tal:condition="python:
> here.portal_membership.getAuthenticatedMember().has_role('Foo')"
>
> As a way of checking for the local role Foo, but this always returns false.
>
> What is the proper syntax for testing for a local role?
To check for local roles, you need to pass context, e.g.:
tal:condition="python:
here.portal_membership.getAuthenticatedMember().has_role('Foo',here)"
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com