[Grok-dev] Re: grok.Permission and grok.Role
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Mon Aug 27 05:43:11 EDT 2007
Jan-Wijbrand Kolman wrote:
> Philipp von Weitershausen wrote:
>> I apologize if this feedback comes a bit late, though I guess it's not
>> too late to potentially change anything.
snip
> I *hope* I can dedicated a bit of time next week to refactor, if noone
> else has the opportunity.
I have implemented your suggestion on the
jw-proper-components-for-role-permission branch.
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
Role permission now look like:
class MyRole(grok.Role):
id = 'my.role'
title = u'My Role' # should this be optional?
description = u'When you're a Bazqux' # optional
grok.permissions('my.permission', ...)
There's no realy "grokified' error reporting yet when you forget about
the id and/or title attribute on your permission and role classes.
I'll merge this with the trunk after I get feedback on this change.
regards,
jw
More information about the Grok-dev
mailing list