[Zope] Determining Local Roles
Dieter Maurer
dieter@handshake.de
Thu, 5 Jul 2001 20:17:28 +0200 (CEST)
Eric Vautour writes:
> I have a stumper here. I am using the following code to determine the
> permissions of users
>
> from AccessControl import getSecurityManager
> user = getSecurityManager().getUser()
> if user.has_permission('Change DTML Documents', ob):
>
> This piece of code appears to detect appropriate permissions if the user is
> set up in an acl_users folder however, this piece of code does not appear
> to work at the "local role" level. That is to say that if I give "Jo"
> permissions to change the "index_html" document, the above code does not see
> "Jo" as having permissions to do so.
I just checked this with my Zope 2.3 CVS.
It does take local roles into account.
Are you sure, your *ob* is what you expect it to be.
Someone else had accidentally rendered the object and passed
in the result (a string).
Dieter