[Zope-Checkins] CVS: Packages/AccessControl -
ImplPython.py:1.1.2.4.20.1
Tres Seaver
tseaver at zope.com
Fri Feb 11 18:54:21 EST 2005
Update of /cvs-repository/Packages/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv11086/lib/python/AccessControl
Modified Files:
Tag: shh-aqtests-branch
ImplPython.py
Log Message:
- Patch to fix the acquired-but-denied bug (Python version only for now).
=== Packages/AccessControl/ImplPython.py 1.1.2.4 => 1.1.2.4.20.1 ===
--- Packages/AccessControl/ImplPython.py:1.1.2.4 Sat Aug 7 13:15:48 2004
+++ Packages/AccessControl/ImplPython.py Fri Feb 11 18:54:21 2005
@@ -17,6 +17,8 @@
import string
from Acquisition import aq_base
+from Acquisition import aq_parent
+from Acquisition import aq_inner
from ExtensionClass import Base
from zLOG import LOG, PROBLEM
@@ -551,6 +553,12 @@
return v
validate = SecurityManagement.getSecurityManager().validate
- if validate(inst, inst, name, v):
+
+ # XXX: Trying to work around CMF #318.
+ container = aq_parent(aq_inner(v))
+ if container is None:
+ container = inst
+
+ if validate(inst, container, name, v):
return v
raise Unauthorized, name
More information about the Zope-Checkins
mailing list