[Zope-CVS] CVS: Products/CompositePage - designuis.py:1.10
Shane Hathaway
shane at zope.com
Tue Apr 6 12:50:26 EDT 2004
Update of /cvs-repository/Products/CompositePage
In directory cvs.zope.org:/tmp/cvs-serv26563
Modified Files:
designuis.py
Log Message:
Relaxed the traversal restriction, since it does not work in all cases. Security gets checked just a little later anyway.
=== Products/CompositePage/designuis.py 1.9 => 1.10 ===
--- Products/CompositePage/designuis.py:1.9 Tue Mar 16 10:33:06 2004
+++ Products/CompositePage/designuis.py Tue Apr 6 12:50:25 2004
@@ -196,9 +196,10 @@
all_choices = None # {template -> 1}
current = None
for path in str(paths).split(':'):
- ob = root.restrictedTraverse(path)
+ ob = root.unrestrictedTraverse(path)
obs.append(ob)
- assert ICompositeElement.isImplementedBy(ob)
+ if not ICompositeElement.isImplementedBy(ob):
+ raise ValueError("Not a composite element: %s" % path)
m = guarded_getattr(ob, "queryInlineTemplate")
template = m()
if current is None:
More information about the Zope-CVS
mailing list