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

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


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

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


=== Zope/lib/python/AccessControl/Owned.py 1.3.18.2 => 1.3.18.3 ===
         owner = udb.getUserById(oid, None)
         if owner is None: return 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 is not None:
+            if not hasattr(owner, 'aq_parent'):
+                owner = owner.__of__(udb)
         return owner
 
     changeOwnership__roles__=()