[Zope-Checkins] CVS: Zope2 - User.py:1.144
shane@digiciool.com
shane@digiciool.com
Mon, 12 Mar 2001 12:08:48 -0500 (EST)
Update of /cvs-repository/Zope2/lib/python/AccessControl
In directory korak:/tmp/cvs-serv28654
Modified Files:
User.py
Log Message:
Removed the workaround since aq_inContextOf() is now fixed.
--- Updated File User.py in package Zope2 --
--- User.py 2001/03/09 17:22:19 1.143
+++ User.py 2001/03/12 17:08:48 1.144
@@ -248,11 +248,7 @@
# Fail the access attempt. Otherwise
# this would be a security hole.
return None
- # -----------------------------------------------------
- # FIXME: this is a workaround for broken aq_inContextOf
- # -----------------------------------------------------
- # if not object.aq_inContextOf(ucontext, 1):
- if not isInContext(ucontext, object):
+ if not object.aq_inContextOf(ucontext, 1):
if 'Shared' in object_roles:
# Damn, old role setting. Waaa
object_roles=self._shared_roles(object)
@@ -1067,15 +1063,5 @@
def reqattr(request, attr):
try: return request[attr]
except: return None
-
-from Acquisition import aq_base, aq_inner, aq_parent
-def isInContext(fixed, variable):
- fixed = aq_base(fixed)
- while variable is not None:
- v = aq_base(variable)
- if v is fixed:
- return 1
- variable = aq_parent(aq_inner(variable))
- return 0
Super = UnrestrictedUser # Note: use of the Super alias is deprecated.