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

Philipp von Weitershausen philipp at weitershausen.de
Fri Aug 24 09:59:20 EDT 2007


On 24 Aug 2007, at 15:49 , Brandon Craig Rhodes wrote:
> Philipp von Weitershausen <philipp at weitershausen.de> writes:
>
>> You might argue that we now no longer use the grok.name()
>> etc. directives.  I don't consider this a disadvantage. After all,
>> they're supposed to be *extra hints* for the grokker to do creation
>> and registration. If the object already inherently contains this
>> information, I think it's much more valuable to have it with the
>> object in the manner that's meaningful and described by the object's
>> API (IPermission and IRole in this case).
>
> Does this mean that the developer now has to memorize which classes he
> names through grok.name() and which ones he names through id = ""?
> Someone not familiar with the internals of Zope 3 will see no reason
> why some classes get named one way and some the other, and will always
> be having to look up which is which.  This would make Grok slightly
> less convenient.
>
> Just a thought.

A very good one.

We should still allow the directives, for reasons of symmetry. But  
also for reasons of symmetry, I feel that the permission and role  
objects should be actual permissions and roles, just like our global  
utilities, adapters, views, etc. are real utilities, adapters and views.



More information about the Grok-dev mailing list