[Grok-dev] Re: grok.Permission and grok.Role

Luis De la Parra lparrab at gmx.net
Mon Aug 27 17:07:59 EDT 2007


Hello,

Jan-Wijbrand Kolman wrote:
> 
> Permssion definitions now look like:
> 
>    class MyPermission(grok.Permission):
>      id = 'my.permission'
>      title = u'My Permission' # should this be optional?
>      description = u'When you're allowed to foobar' # optional

I don't know how other people see it, but I think it would be nice to get
rid of the id (or at least make it optional), and have it "generated" from
the fully-qualified class name (the same goes for role definition)

#mypackage/module.py

   class MyPermission(grok.Permission):
      pass #permission id is mypackage.module.mypermission


hmm...on the other hand, this would make moving code around difficult as it
would break all existing authorization grants. I still like the basic idea
though.

regards. l



More information about the Grok-dev mailing list