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

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


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

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


=== Zope/lib/python/AccessControl/Owned.py 1.10 => 1.10.4.1 ===
         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 not hasattr(owner, 'aq_parent'):
+            owner = owner.__of__(udb)
         return owner
 
     changeOwnership__roles__=()