[Zope3-Users] Permissions of a given object
Frank Burkhardt
fbo2 at gmx.net
Thu Jan 12 08:37:24 EST 2006
Hi,
On Thu, Jan 12, 2006 at 07:19:02AM -0500, Stephan Richter wrote:
[snip]
> > But canAccess never fails here - even if the object is inaccessible.
>
> canAccess() returns a boolean unless there is no security declaration at all.
I changed the code fragement to
for obj in catalog.searchResults(content=searchquery):
view=zapi.queryMultiAdapter((obj,self.request),name='view.html')
if canAccess(view,'__call__'):
search_results.append(obj)
else:
"""object inaccessible"""
but the problem remains: canAccess returns True for all inaccessible objects.
Regards,
Frank
More information about the Zope3-users
mailing list