[Zope3-Users] Permissions of a given object

Dominik Huber dominik.huber at perse.ch
Thu Dec 15 04:27:00 EST 2005

Frank Burkhardt wrote:

>when I search using a catalog, I get a list of persistent objects
>but maybe there are objects among them, the calling user
>doesn't have permissions for.
>How do I check, if the current user (the one calling the view
>which queries the catalog) is allowed to view an object?
zope.security.checker.canAccess and .canWrite

>How do I change permissions of a persistent object in python
>(not using the ZMI)?
from zope.app.securitypolicy.interfaces import IPrincipalPermissionManager
permissions = IPrincipalPermissionManager(context)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: dominik.huber.vcf
Type: text/x-vcard
Size: 154 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20051215/aec2b7d5/dominik.huber.vcf

More information about the Zope3-users mailing list