[Zope-Checkins] CVS: Zope/lib/python/AccessControl - Owned.py:1.18.4.3 PermissionRole.py:1.16.4.3 User.py:1.170.4.4 ZopeSecurityPolicy.py:1.20.2.3

Chris McDonough chrism@zope.com
Sat, 26 Oct 2002 15:52:07 -0400


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

Modified Files:
      Tag: chrism-install-branch
	Owned.py PermissionRole.py User.py ZopeSecurityPolicy.py 
Log Message:
Merge with HEAD.  Again, sorry for the spew (what's left of it... someone seems to have filtered some of this branch's checkins out).


=== Zope/lib/python/AccessControl/Owned.py 1.18.4.2 => 1.18.4.3 ===


=== Zope/lib/python/AccessControl/PermissionRole.py 1.16.4.2 => 1.16.4.3 ===


=== Zope/lib/python/AccessControl/User.py 1.170.4.3 => 1.170.4.4 ===
--- Zope/lib/python/AccessControl/User.py:1.170.4.3	Tue Oct  8 17:45:43 2002
+++ Zope/lib/python/AccessControl/User.py	Sat Oct 26 15:51:36 2002
@@ -85,7 +85,7 @@
         """Return the list of roles assigned to the user,
            including local roles assigned in context of
            the passed in object."""
-        name=self.getUserName()
+        userid=self.getId()
         roles=self.getRoles()
         local={}
         object=getattr(object, 'aq_inner', object)
@@ -95,7 +95,7 @@
                 if callable(local_roles):
                     local_roles=local_roles()
                 dict=local_roles or {}
-                for r in dict.get(name, []):
+                for r in dict.get(userid, []):
                     local[r]=1
             inner = getattr(object, 'aq_inner', object)
             parent = getattr(inner, 'aq_parent', None)
@@ -207,14 +207,14 @@
         # this manually rather than call getRolesInContext so that
         # we can incur only the overhead required to find a match.
         inner_obj = getattr(object, 'aq_inner', object)
-        user_name = self.getUserName()
+        userid = self.getId()
         while 1:
             local_roles = getattr(inner_obj, '__ac_local_roles__', None)
             if local_roles:
                 if callable(local_roles):
                     local_roles = local_roles()
                 dict = local_roles or {}
-                local_roles = dict.get(user_name, [])
+                local_roles = dict.get(userid, [])
                 for role in object_roles:
                     if role in local_roles:
                         if self._check_context(object):


=== Zope/lib/python/AccessControl/ZopeSecurityPolicy.py 1.20.2.2 => 1.20.2.3 ===