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
4b959522
Commit
4b959522
authored
Jan 04, 2001
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use _is_wrapperish flag to skip PermissionMappings when getting
context or container.
parent
5100029d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
lib/python/Products/PythonScripts/Bindings.py
lib/python/Products/PythonScripts/Bindings.py
+17
-3
No files found.
lib/python/Products/PythonScripts/Bindings.py
View file @
4b959522
...
...
@@ -83,7 +83,7 @@
#
##############################################################################
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
4
$'
[
11
:
-
2
]
import
Globals
from
Globals
import
Persistent
,
HTMLFile
,
package_home
...
...
@@ -106,8 +106,8 @@ class NameAssignments:
# Note that instances of this class are intended to be immutable
# and persistent but not inherit from ExtensionClass.
_exprs
=
((
'name_context'
,
'self.
aq_parent
'
),
(
'name_container'
,
'self.
aq_inner.aq_parent
'
),
_exprs
=
((
'name_context'
,
'self.
_getContext()
'
),
(
'name_container'
,
'self.
_getContainer()
'
),
(
'name_m_self'
,
'self'
),
(
'name_ns'
,
'self._getNamespace(caller_namespace, kw)'
),
(
'name_subpath'
,
'self._getTraverseSubpath()'
),
...
...
@@ -294,6 +294,20 @@ class Bindings (Persistent):
bindcount
=
self
.
_v_bindcount
return
bindcount
def
_getContext
(
self
):
# Utility for bindcode.
while
1
:
self
=
self
.
aq_parent
if
not
getattr
(
self
,
'_is_wrapperish'
,
None
):
return
self
def
_getContainer
(
self
):
# Utility for bindcode.
while
1
:
self
=
self
.
aq_inner
.
aq_parent
if
not
getattr
(
self
,
'_is_wrapperish'
,
None
):
return
self
def
_getTraverseSubpath
(
self
):
# Utility for bindcode.
if
hasattr
(
self
,
'REQUEST'
):
...
...
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