[Zope-Checkins] CVS: Zope/lib/python/AccessControl - Owned.py:1.11.16.2

Brian Lloyd brian@zope.com
Fri, 1 Mar 2002 14:44:32 -0500


Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv26115

Modified Files:
      Tag: Zope-2_4-branch
	Owned.py 
Log Message:
Patch for collector #254


=== Zope/lib/python/AccessControl/Owned.py 1.11.16.1 => 1.11.16.2 ===
             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