26 Feb
2001
26 Feb
'01
11:52 p.m.
I've got an __of__ function: def __of__(self, parent): if not hasattr(self, 'aq_parent'): return ImplicitAcquisitionWrapper(self, parent) else: category = parent.unrestrictedTraverse(self._category._path) return ImplicitAcquisitionWrapper(self, category.__of__(parent)) The goal is to insert another object (self._category) into my objects context (so security settings on the category can be inherited by this object). It mostly works, however the chain is broken above my containing parent: ob.aq_inner.aq_parent -- is not a wrapper This results in all kinds of failures in ZopeSecurityPolicy.validate. Any suggestions? I still don't fully understand how this is supposed to work. Thanks, -Randy