"Randall F. Kern" wrote:
> I haven't worked with this code closely in a few months, but as I recall
> permissions that are acquired are stored as a list, and those that
> aren't are stored as a tuple.
>
> if type(self._View_Permission) == type(()):
> # done, this permission isn't acquired above this point
>
> Furthermore, I may be missing the point of this thread, but if you are
> trying to get the list of all roles assigned to a permission (from a
> python product), you could use this:
>
> from AccessControl.PermissionRole import rolesFromPermissionOn
>
> roles = rolesFromPermissionOn('View', ob)
Whoah! Yet another hidden Zope gem. Sometimes this is soooo frustrating!!!
And it's roles_For_PermissionOn, not From... it does the job though...
Richard
--
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )