[Zope] local roles
Dieter Maurer
dieter@handshake.de
Sat, 7 Dec 2002 00:14:58 +0100
Marie Robichon writes:
> I have a user with a local role of Job Manager. How do I test for this
> local role ?
>
> <dtml-if "'JobManager' in _.SecurityGetUser().getRoles()">....</dtml-if>
> does not work
>
> The following just gives me 'Authenticated' as her role, since no actual
> role is defined at root level for her.
>
> <dtml-var "_.SecurityGetUser().getRoles()">
Local roles require a context with respect to which they are local.
You use "user.getRolesInContext(context)".
Dieter