Friday, August 1, 2008

Adding a custom permission to a Plone 2.5 product

Figuring out how to register a new permission in a Zope product took me some time. Here's how i did it: In Extensions/, put this::

from Products.CMFCore.permissions import setDefaultRoles

def install(self, reinstall=False):
setDefaultRoles('MyProduct: MyPermission', ())

And that's all i have to say about that.

Edit: This is now a how-to on

No comments: