Re: (Zope2) a proposed tweak to assigning default roles to permissions

David Glick <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
On 8/19/10 12:46 AM, Hanno Schlichting wrote:
> Hi.
>
> On Thu, Aug 19, 2010 at 6:15 AM, David Glick <[email protected]> wrote:
>   
>> As an alternative to requiring calling setDefaultRoles/addPermission at
>> import time, I suggest that we add an optional roles attribute to the
>> <permission> directive.  This would then be used when the directive is
>> executed, instead of the current hard-coded Manager setting.  Examples:
>>
>> <!-- a new permission with 2 default roles -->
>> <permission id="my.NewPermission" title="My new permission"
>> roles="Manager SiteAdmin"/>
>> <!-- a new permission with Manager as the sole, implicit role
>> (backwards-compatible) -->
>> <permission id="my.OtherPermission" title="My other permission"/>
>>     
> Can roles currently contain whitespace? Like "Awesome People"?
>
> If so, we should go for nested nodes:
>
> <permission id="my.NewPermission" title="My new permission">
>   <role>Manager</role>
>   <role>SiteAdmin</role>
>   <role>Awesome People</role>
> </permission>
>
> I think this matches the style of some of the GenericSetup handlers
> which deal with permissions.
>   
Implemented at
svn+ssh://svn.zope.org/repos/main/AccessControl/branches/davisagli-permission-directive
-- can someone please review?

Also, where should I document this addition?

thanks,
----------		
David Glick
 Web Developer
 [email protected]
 206.286.1235x32

Groundwire: You Are Connected		
 http://groundwire.org		
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.