Hi, 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()"> TIA Marie Robichon Web Task Force European Synchrotron Radiation Facility BP 220 38043 Grenoble Cedex France Tel: (33) 04 76 88 21 86 Fax: (33) 04 76 88 24 27
Try: <dtml-var "_.SecurityGetUser().get_local_roles()"> Kevin -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Marie Robichon Sent: Friday, December 06, 2002 10:25 AM To: zope@zope.org Subject: [Zope] local roles Hi, 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()"> TIA Marie Robichon Web Task Force European Synchrotron Radiation Facility BP 220 38043 Grenoble Cedex France Tel: (33) 04 76 88 21 86 Fax: (33) 04 76 88 24 27 _______________________________________________ Zope maillist - Zope@zope.org 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 )
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
participants (3)
-
Dieter Maurer -
Kevin Carlson -
Marie Robichon