Re: [Zope-dev] (Zope2) a proposed tweak to assigning default roles to permissions

2010-08-19 Thread David Glick
On 8/19/10 12:46 AM, Hanno Schlichting wrote: > Hi. > > On Thu, Aug 19, 2010 at 6:15 AM, David Glick > wrote: > >> As an alternative to requiring calling setDefaultRoles/addPermission at >> import time, I suggest that we add an optional roles attribute to the >> directive. This would then be

Re: [Zope-dev] (Zope2) a proposed tweak to assigning default roles to permissions

2010-08-19 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/19/10 09:46 , Hanno Schlichting wrote: > Can roles currently contain whitespace? Like "Awesome People"? > > If so, we should go for nested nodes: > > > Manager > SiteAdmin > Awesome People > > > I think this matches the style of some of

Re: [Zope-dev] (Zope2) a proposed tweak to assigning default roles to permissions

2010-08-19 Thread Martin Aspeli
Hi, On 19 August 2010 16:46, Hanno Schlichting wrote: > Hi. > > On Thu, Aug 19, 2010 at 6:15 AM, David Glick > wrote: >> As an alternative to requiring calling setDefaultRoles/addPermission at >> import time, I suggest that we add an optional roles attribute to the >> directive.  This would th

Re: [Zope-dev] (Zope2) a proposed tweak to assigning default roles to permissions

2010-08-19 Thread Hanno Schlichting
Hi. On Thu, Aug 19, 2010 at 6:15 AM, David Glick wrote: > As an alternative to requiring calling setDefaultRoles/addPermission at > import time, I suggest that we add an optional roles attribute to the > directive.  This would then be used when the directive is > executed, instead of the current

Re: [Zope-dev] (Zope2) a proposed tweak to assigning default roles to permissions

2010-08-18 Thread David Glick
> Proposal: > > As an alternative to requiring calling setDefaultRoles/addPermission at > import time, I suggest that we add an optional roles attribute to the > directive. This would then be used when the directive is > executed, instead of the current hard-coded Manager setting. Examples: > >

[Zope-dev] (Zope2) a proposed tweak to assigning default roles to permissions

2010-08-18 Thread David Glick
Background: In Zope 2 prior to Zope 2.12, registering a new permission involved the following (usually behind-the-scenes) steps: 1. adding the permission name to the AccessControl.Permission._registeredPermissions dictionary 2. adding a tuple to the Products.__ac_permissions__ list including the p