[Zope-dev] Proposal: Align Zope 2 and Zope 3 permissions

Martin Aspeli optilude+lists at gmail.com
Mon Apr 13 06:49:28 EDT 2009


Martin Aspeli wrote:

I've now implemented 1 and 2 on trunk, since they seem pretty 
non-controversial.

>   1) Use an event handler to ensure that any <permission /> declared in 
> ZCML actually creates a valid, Zope 2 permission. I have working code 
> for this here which we could put in Products.Five with ease.

and

>   2) Emit a warning instead of an error in Five's handler for the <class 
> /> directive when set_attributes or set_schema are used.

I've not done this yet:

>   3) Change the Permission class in AccessControl so that it tries to 
> look up an IPermission utility and use the title of that utility as the 
> permission name, falling back on the current behaviour of using the 
> passed permission name directly.

I'd like to solicit a bit more input before attempting this, as I got at 
least one -1.

I think this is the bigger win, though, and I'd still like to do it 
unless performance becomes prohibitive or it turns out to be too 
invasive a change.

Cheers,
Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book



More information about the Zope-Dev mailing list