[ZPT] CVS: Zope/lib/python/Products/PageTemplates - Expressions.py:1.31.10.3
Shane Hathaway
shane@cvs.zope.org
Thu, 12 Sep 2002 17:57:34 -0400
Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv20927
Modified Files:
Tag: Zope-2_5-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.
=== Zope/lib/python/Products/PageTemplates/Expressions.py 1.31.10.2 => 1.31.10.3 ===
--- Zope/lib/python/Products/PageTemplates/Expressions.py:1.31.10.2 Tue Mar 12 13:34:48 2002
+++ Zope/lib/python/Products/PageTemplates/Expressions.py Thu Sep 12 17:57:33 2002
@@ -321,7 +321,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):