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

2009-04-14 Thread Martin Aspeli
Martijn Faassen wrote: > Hey, > > Martin Aspeli wrote: > [snip] >> - In ZCML (or a grok.require() directive) use the Zope 3 name > > Grok also has a grok.Permission you can subclass, and those subclasses > can also be passed to grok.require(). I know, but I kind of consider creating permissio

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

2009-04-14 Thread Martijn Faassen
Hey, Martin Aspeli wrote: [snip] > - In ZCML (or a grok.require() directive) use the Zope 3 name Grok also has a grok.Permission you can subclass, and those subclasses can also be passed to grok.require(). > - In code, e.g. when doing a checkPermission() call, use the Zope 2 name > - With

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

2009-04-13 Thread Martin Aspeli
Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Martin Aspeli wrote: > >> 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

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

2009-04-13 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin Aspeli wrote: > 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 beh

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

2009-04-13 Thread Martin Aspeli
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 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 eas

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

2009-04-13 Thread Martin Aspeli
Dieter Maurer wrote: > Martin Aspeli wrote at 2009-4-12 18:31 +0800: >> >> Finally, there is not total parity between Zope 2 security and Zope 3 >> security. Zope 2 cannot protect 'property set', for example. > > Since Zope 2.8, Zope 2 could in principle -- and until quite recently > I thoug

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

2009-04-12 Thread Dieter Maurer
Martin Aspeli wrote at 2009-4-12 18:31 +0800: > ... > 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 directl

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

2009-04-12 Thread Dieter Maurer
Martin Aspeli wrote at 2009-4-12 18:31 +0800: > >Finally, there is not total parity between Zope 2 security and Zope 3 >security. Zope 2 cannot protect 'property set', for example. Since Zope 2.8, Zope 2 could in principle -- and until quite recently I thought, it really can: it only fails w

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

2009-04-12 Thread Martin Aspeli
Hanno Schlichting wrote: > Martin Aspeli wrote: >> So, here is what I'd like to propose, ideally for Zope 2.12: >> >> 1) Use an event handler to ensure that any declared in >> ZCML actually creates a valid, Zope 2 permission. I have working code >> for this here which we could put in Products.

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

2009-04-12 Thread Hanno Schlichting
Martin Aspeli wrote: > So, here is what I'd like to propose, ideally for Zope 2.12: > > 1) Use an event handler to ensure that any 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. +1 > 2) Emi

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

2009-04-12 Thread Martijn Pieters
On Sun, Apr 12, 2009 at 12:31, Martin Aspeli wrote: >  1) Use an event handler to ensure that any 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. > > http://dev.plone.org/collective/browser/collecti

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

2009-04-12 Thread Lennart Regebro
On Sun, Apr 12, 2009 at 12:31, Martin Aspeli wrote: > Thoughts? I haven't had my dead deeep down in the Zope 2 security for three years, so I'm a bit fuzzy on how it works, but all this sounds like a good step forward. +1 -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.c

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

2009-04-12 Thread Martin Aspeli
Hi all, For a while now, people have had to contend with two ways of doing certain things, depending on whether the code they are working with is in "Zope 2 land" or "Zope 3 land". We're getting closer to a world where people don't need to be so intimately aware of the differences, especially