[Zope-Checkins] CVS: Zope/lib/python/Shared/DC/Scripts -
Bindings.py:1.9.68.3
Brian Lloyd
brian at zope.com
Wed Jan 21 14:03:17 EST 2004
Update of /cvs-repository/Zope/lib/python/Shared/DC/Scripts
In directory cvs.zope.org:/tmp/cvs-serv20129/lib/python/Shared/DC/Scripts
Modified Files:
Tag: Zope-2_7-branch
Bindings.py
Log Message:
fix getContext, getContainer
=== Zope/lib/python/Shared/DC/Scripts/Bindings.py 1.9.68.2 => 1.9.68.3 ===
--- Zope/lib/python/Shared/DC/Scripts/Bindings.py:1.9.68.2 Wed Jan 21 13:51:03 2004
+++ Zope/lib/python/Shared/DC/Scripts/Bindings.py Wed Jan 21 14:03:17 2004
@@ -254,7 +254,9 @@
parent = getattr(self, 'aq_parent', None)
inner = getattr(self, 'aq_inner', None)
container = getattr(inner, 'aq_parent', None)
- getSecurityManager().validate(parent, container, '', self)
+ try: getSecurityManager().validate(parent, container, '', self)
+ except Unauthorized:
+ return UnauthorizedBinding('context')
return self
def _getContainer(self):
@@ -265,7 +267,9 @@
parent = getattr(self, 'aq_parent', None)
inner = getattr(self, 'aq_inner', None)
container = getattr(inner, 'aq_parent', None)
- getSecurityManager().validate(parent, container, '', self)
+ try: getSecurityManager().validate(parent, container, '', self)
+ except Unauthorized:
+ return UnauthorizedBinding('container')
return self
def _getTraverseSubpath(self):
More information about the Zope-Checkins
mailing list