[Grok-dev] Security declarations
marc at rijken.org
Fri Oct 9 11:08:00 EDT 2009
I forgot to reply to the list
-------- Originele bericht --------
Onderwerp: Re: [Grok-dev] Security declarations
Datum: Fri, 09 Oct 2009 16:59:28 +0200
Van: Marc Rijken <marc at rijken.org>
Aan: Martijn Faassen <faassen at startifact.com>
Thanx for your prompt reply. I have tried is in grok0.14. I did not get
any errors, but it did not work. When I changed the classes in to
strings it did work. I have moved the code to grok1.0 and it works as
expected. I'm not sure that was the only difference.
BTW this behaviour is not document on
which states " permission -- the name of the permission that is required"
Op 9-10-2009 16:13, Martijn Faassen schreef:
> Marc Rijken wrote:
>> In the security declarations we have to use the name of the permission.
>> For me it is more logical and less error sensitive when the string may
>> be replaced by the class.
>> My preferred situation is:
>> class FooPermssion(grok.Permission):
>> grok.title('Foo Permission')
>> class FooRole(grok.Role):
>> grok.title('Foo Role')
>> FooPermission, # class instead of string
>> class FooView(grok.View):
>> grok.require(FooPermission) # class instead of string
>> What do you think?
> Have you tried this? I thought we had this feature already, at least in
> grok.View. I'm not sure whether it also works for grok.Role. If not,
> that we should add this.
> Grok-dev mailing list
> Grok-dev at zope.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Grok-dev