[Zope3-Users] Permissions of a given object

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Jan 12 07:19:02 EST 2006


On Thursday 12 January 2006 07:01, Frank Burkhardt wrote:
>  for obj in catalog.searchResults(content=searchquery):
>     view=zapi.queryMultiAdapter((obj,self.request),name='view.html')
>     try:
>        canAccess(view,'__call__')
>        search_results.append(obj)
>     except:
>        """object inaccessible"""
>
> But canAccess never fails here - even if the object is inaccessible.

canAccess() returns a boolean unless there is no security declaration at all.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-users mailing list