Commit 349752cd authored by Andreas Jung's avatar Andreas Jung

- Launchpad #373658: traversal using (un)restrictedTraverse 
  no longer depends no the existence of a request 
parent e28c9b79
......@@ -23,6 +23,9 @@ Restructuring
Features Added
++++++++++++++
- Launchpad #373658: traversal using (un)restrictedTraverse
no longer depends no the existence of a request
- Launchpad #373583: ZODBMountPoint - fixed broken mount support and
extended the test suite.
......
......@@ -154,6 +154,7 @@ class Traversable:
path = list(path)
REQUEST = {'TraversalRequestNameStack': path}
web_request = getattr(self, 'REQUEST', None)
path.reverse()
path_pop = path.pop
......@@ -198,7 +199,7 @@ class Traversable:
ns, nm = nsParse(name)
try:
next = namespaceLookup(
ns, nm, obj, aq_acquire(self, 'REQUEST'))
ns, nm, obj, web_request).__of__(obj)
if IAcquirer.providedBy(next):
next = next.__of__(obj)
if restricted and not validate(
......@@ -264,7 +265,7 @@ class Traversable:
except (AttributeError, NotFound, KeyError), e:
# Try to look for a view
next = queryMultiAdapter((obj, aq_acquire(self, 'REQUEST')),
next = queryMultiAdapter((obj, web_request),
Interface, name)
if next is not None:
......
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