Menu
  • HOME
  • TAGS

What is the way to know a Zope permission title by knowing its id (and vice-versa)?

permissions,plone,zope,zope3

Permissions are registered as zope.security.interfaces.IPermission utilities by their id; you can thus look them up by their ids by using zope.component.getUtility(): from zope.component import getUtility from zope.security.interfaces import IPermission permission = getUtility(IPermission, name=u'choosen.id.for.your.permission') print permission.title To go the other way, from title to id, you need to search all utilities:...

Can zope.publisher.browser.BrowserView be used in Plone?

plone,zope,zope3

You need to use Products.Five.browser.BrowserView because it is in charge of plugging the view in Acquisition, hence (among others) in Zope 2 security infrastructure. It inherits from AcquisitionBBB. Zope 2 security relies on acquisition to configure permissions only at root of content trees....