You need to check to see if said user has that role on the object in
question.  getRoles is only going to show you roles assigned in the User
Folder, not local roles.

This code is doing a similar thing on my site, with a different role:

<dtml-if expr="_.SecurityGetUser().has_role('Development Manager',
this())"> 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Allen Schmidt Sr.
Sent: Tuesday, August 05, 2008 10:38 AM
To: zope@zope.org
Subject: [Zope] Question about Roles

Zope 2.8.9.1

I have a user in the root acl_users but no Roles set. Then I go into the
folder I want the user to have access in and using Local Roles, I assign
Manager. Then on the page I use:

<dtml-if "'Manager' in _.SecurityGetUser().getRoles()">
   show the update and delete form buttons </dtml-if>


For me, with Manager assigned in the root, I can see the buttons. But
for this user, the buttons are not there. When I dtml-var the above
getRoles() she only shows as 'Authenticated' but not 'Manager' and I
show both.

Just wondering why??

Thanks

Allen


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to