[Zope-Checkins] CVS: Zope/lib/python/AccessControl - User.py:1.166.10.1

Matthew T. Kromer matt@zope.com
Fri, 1 Mar 2002 12:55:54 -0500


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

Modified Files:
      Tag: Zope-2_5-branch
	User.py 
Log Message:
Checkin security fix where user was returned unwrapped to ZopeSecurityPolicy


=== Zope/lib/python/AccessControl/User.py 1.166 => 1.166.10.1 ===
         """Return the user corresponding to the given id.
         """
-        try: return self.getUser(id)
+        # The connection between getting by ID and by name is not a strong
+        # one
+        try:
+            result=self.getUser(id)
+            return result.__of__(self) # Wrap in our context
         except:
            if default is _marker: raise
            return default