[Zope-CMF] AUTHENTICATED_USER.has_role and local roles
Jens Vagelpohl
jens@zope.com
Thu, 11 Oct 2001 07:36:51 -0400
use getRolesInContext instead::
<dtml-if expr="'Manager' in AUTHENTICATED_USER.getRolesInContext( this() )
">
...
it takes local roles into account by making sure to check in the context
of the object you pass along.
jens
On Thursday, October 11, 2001, at 03:51 , Marc Fischer wrote:
> Hi,
>
> I just noticed a little problem. In the index_html of my cmf site, I
> check a
> link with the following command before displaying it:
>
> <dtml-if "AUTHENTICATED_USER.has_role('Manager')">
> <a href="&dtml-portal_url;/xxx">xxx</a>
> </dtml-if>
>
> That works fine if the user has the original 'Manager' role. But If I
> assign
> only the local role 'Manager' to him in the root of the cmf site - which
> should do the same thing, I think -he does not get displayed the link!
>
> Perhaps someone could help ...
>
> Thank you, Marc
>
>