[ZPT] CVS: Zope27/lib/python/Products/PageTemplates - Expressions.py:1.35.18.2
Florent Guillaume
fg@nuxeo.com
Sun, 15 Sep 2002 16:36:57 -0400
Update of /cvs-repository/Zope27/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv12851
Modified Files:
Tag: Zope-2_7-development-branch
Expressions.py
Log Message:
Merge from head.
Continuation of fix for bug #558. restrictedTraverse() incorrectly denied
access in certain situations when using a __bobo_traverse__ hook.
=== Zope27/lib/python/Products/PageTemplates/Expressions.py 1.35.18.1 => 1.35.18.2 ===
--- Zope27/lib/python/Products/PageTemplates/Expressions.py:1.35.18.1 Tue Jul 30 16:14:32 2002
+++ Zope27/lib/python/Products/PageTemplates/Expressions.py Sun Sep 15 16:36:56 2002
@@ -318,7 +318,11 @@
o=t(REQUEST, name)
container = None
- if has(o, 'im_self'):
+ if aq_base(o) is not o:
+ # The object is wrapped, so the acquisition
+ # context determines the container.
+ container = aq_parent(aq_inner(o))
+ elif has(o, 'im_self'):
container = o.im_self
elif (has(get(object, 'aq_base', object), name)
and get(object, name) == o):