+ obj = self.aq_parent.unrestrictedTraverse(self.getPath(), None) + if obj and securityManager.validate(obj, obj, None, None): + return obj + else: + return None
Urm, Roche, doesn't the above seek to do exactly what...
return self.aq_parent.restrictedTraverse(self.getPath(), None)
The problem is that an error should be raised, Unauthorized in my opinion, rather than None being returned.
None should never be returned in place of a brain, although I'll soften that to say that if it does, it means something weird has happened (used to mean the object the catalog entry mapped to had gone away)
...should be fine, no?
Simplistix - Content Management, Zope & Python Consulting
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce