[Zope-Checkins] CVS: Zope/lib/python/AccessControl - Owned.py:1.15.10.1
Brian Lloyd
brian@zope.com
Fri, 1 Mar 2002 14:45:26 -0500
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv26544
Modified Files:
Tag: Zope-2_5-branch
Owned.py
Log Message:
Patch for collector # 254
=== Zope/lib/python/AccessControl/Owned.py 1.15 => 1.15.10.1 ===
user = udb.getUserById(oid, None)
if user is None: user = SpecialUsers.nobody
+
+ # If we return a user, always return it wrapped, as it might
+ # be used in security checks by the security policy!!
+ if udb and (user is not SpecialUsers.nobody):
+ if not hasattr(user, 'aq_parent'):
+ user = user.__of__(udb)
+
objectCache[upath] = user
return user