Martijn Faassen wrote:
Technically, I think that this is going to be hard. You'd need to patch
in the magic acquisition base class. Acquisition is the main reason that
some of the code needed to be duplicated - without the existence of
acquisition wrappers, security checks are not made for view access and
things just won't work.
I think if we could finish the philikon-aq_parent branch (or whatever
it's called) that makes it possible to do acquisition using __parent__
pointers, we'd be a lot closer.
Hanno and Philipp know more, but I think it's reasonably close.
We do explicit acquisition in those bits of code, but it's still a pain
and leads to confusion around self.context in views being
acquisition-wrapped weirdly, breaking some expectations around aq_parent.
And other bizarre things sometimes.
The way to get rid of many of these problems would be to get rid of the
need for acquisition. Philipp started a branch long ago that allows the
acquisition system to look at a __parent__ pointer if no acquisition
wrapper is present. Since our views have __parent__ pointers, this
should fix the issue. This branch has been lingering in an "almost
ready" state for a long time now.
Ah, great minds think alike. ;)
Martin
--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
_______________________________________________
Zope-Dev maillist - Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )