[Grok-dev] Re: How do I check permissions on a view?

Sebastian Ware sebastian at urbantalk.se
Mon Sep 24 15:16:26 EDT 2007


Excellent!!! This too is a great recipe :) I am very greatful!

Mvh Sebastian

24 sep 2007 kl. 18.34 skrev Philipp von Weitershausen:

> Philipp von Weitershausen wrote:
>> Sebastian Ware wrote:
>>> To check permissions on an object I can use...
>>>
>>>   zope.security.canAccess
>>>   zope.security.canWrite
>>>
>>> ...is there a similar way of checking if the current principal  
>>> may access a given view? Maybe using the URL?
>> zope.security.canAccess(view, '__call__')
>
> Oh, and in case you're wondering, you can get the view via
>
>   zope.component.getMultiAdapter((obj, request), name='index.html')
>
>
> -- 
> http://worldcookery.com -- Professional Zope documentation and  
> training



More information about the Grok-dev mailing list