Monday, May 4, 2009, 9:18:52 PM, Hedley Roos wrote:
__allow_access_to_unprotected_subobjects__ = 1
That indeed works, thanks!
You probably should not use that line too often :)
I would prefer doing it correctly/safely, but is there a way? Because it even exposes the unprotected subobjects of the acquired objects... sounds a bit scary to me.
I don't know what your use case is, but you could either: 1) Expose attributes through methods on your Adhoc class 2) Use a browser view, which is what I'd do.
The use-case is that there is a product that collects information from other objects, depending on the current user and on query parameters, and that collected information should be present as a HTML page... so I think 1) won't work here. Regarding 2), I don't know this "browser view" thing, but I recon that's a Five/Zope 3 feature, is it? Because unfortunately it's a messy 2.7.6 + Plone 2.0 instance here, and it's not like I can migrate it before the current job is done.
Hedley _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Best regards, Daniel Dekany