[Zope-dev] Weird IndexableObjectWrapper + TopicIndex + aq_acquired
interactions.
Dieter Maurer
dieter at handshake.de
Tue Sep 20 13:38:41 EDT 2005
Lennart Regebro wrote at 2005-9-19 17:38 +0200:
> ...
>aq_acquire will, if the first parameter is not an AcquisitionWrapper,
>and the third parameter is not None, wrap the object.
>
>Now, in our case, the object is an IndexableObjectWrapper, wrapping an
>Acquisition wrapped object. So, aq_acquire will Acquicision wrap the
>IndexableObjectWrapper, with the result that the object being used now
>has no context!
Really?
What is the "aq_parent" that was used when wrapping the object?
It is context of the "IndexableObjectWrapper".
The context of the indexable wrapped object does not change.
> ...
>Then, it passes this to validate, who in turn passes it to allowed,
>who check that the object has the users user folder in it's context.
>
>And it hasn't, because it has no context. *blam* You get an
>AuthorizedError, and the object does not get indexed.
Where does the context come from used when "aq_acquire" acquisition
wrapped the "IndexableObjectWrapper"?
The best way around such problems would probably by to make
"IndexableObjectWrapper" a public class.
--
Dieter
More information about the Zope-Dev
mailing list