Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ab667b57
Commit
ab667b57
authored
Feb 28, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reverted last change
parent
0aefabb3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
lib/python/OFS/Traversable.py
lib/python/OFS/Traversable.py
+8
-2
No files found.
lib/python/OFS/Traversable.py
View file @
ab667b57
...
@@ -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 security
s
return
self
.
unrestrictedTraverse
(
path
,
default
,
restricted
=
1
)
return
self
.
unrestrictedTraverse
(
path
,
default
,
restricted
=
1
)
InitializeClass
(
Traversable
)
InitializeClass
(
Traversable
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment