Commit fe65f5a5 authored by Evan Simpson's avatar Evan Simpson

Hack around __bobo_traverse__ validation problem.

parent b9637d61
...@@ -89,7 +89,7 @@ Page Template-specific implementation of TALES, with handlers ...@@ -89,7 +89,7 @@ Page Template-specific implementation of TALES, with handlers
for Python expressions, string literals, and paths. for Python expressions, string literals, and paths.
""" """
__version__='$Revision: 1.19 $'[11:-2] __version__='$Revision: 1.20 $'[11:-2]
import re, sys import re, sys
from TALES import Engine, CompilerError, _valid_name, NAME_RE, \ from TALES import Engine, CompilerError, _valid_name, NAME_RE, \
...@@ -312,8 +312,10 @@ def restrictedTraverse(self, path, securityManager, ...@@ -312,8 +312,10 @@ def restrictedTraverse(self, path, securityManager,
o=t(REQUEST, name) o=t(REQUEST, name)
container = None container = None
if (has(get(object, 'aq_base', object), name) if has(o, 'im_self'):
and get(object, name) is o): container = o.im_self
elif (has(get(object, 'aq_base', object), name)
and get(object, name) == o):
container = object container = object
if not validate(object, container, name, o): if not validate(object, container, name, o):
raise 'Unauthorized', name raise 'Unauthorized', name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment