Commit ab667b57 authored by Andreas Jung's avatar Andreas Jung

reverted last change

parent 0aefabb3
...@@ -133,6 +133,12 @@ class Traversable: ...@@ -133,6 +133,12 @@ class Traversable:
If true, then all of the objects along the path are validated with If true, then all of the objects along the path are validated with
the security machinery. Usually invoked using restrictedTraverse(). the security machinery. Usually invoked using restrictedTraverse().
""" """
if not isinstance(path, str):
path = [x for x in path if x]
print 'r',self.absolute_url(1), path
if not path: if not path:
return self return self
...@@ -173,7 +179,7 @@ class Traversable: ...@@ -173,7 +179,7 @@ class Traversable:
name = path_pop() name = path_pop()
__traceback_info__ = path, name __traceback_info__ = path, name
if name.startswith('_'): if name[0] == '_':
# Never allowed in a URL. # Never allowed in a URL.
raise NotFound, name raise NotFound, name
...@@ -238,7 +244,7 @@ class Traversable: ...@@ -238,7 +244,7 @@ class Traversable:
security.declarePublic('restrictedTraverse') security.declarePublic('restrictedTraverse')
def restrictedTraverse(self, path, default=_marker): def restrictedTraverse(self, path, default=_marker):
# Trusted code traversal code, always enforces security # Trusted code traversal code, always enforces securitys
return self.unrestrictedTraverse(path, default, restricted=1) return self.unrestrictedTraverse(path, default, restricted=1)
InitializeClass(Traversable) InitializeClass(Traversable)
......
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