[Zope-CVS] SVN: PluggableAuthService/trunk/ - Fixing up inconsistent searching in the listAvailablePrincipals

Jens Vagelpohl jens at dataflake.org
Sat Feb 25 13:51:23 EST 2006


Log message for revision 65456:
  - Fixing up inconsistent searching in the listAvailablePrincipals
    method of the ZODBRoleManager and ZODBGroupManager plugins. Now both
    constrain searches by ID.
    (http://www.zope.org/Members/urbanape/PluggableAuthService/Collector/11)
  

Changed:
  U   PluggableAuthService/trunk/doc/CHANGES.txt
  U   PluggableAuthService/trunk/plugins/ZODBGroupManager.py

-=-
Modified: PluggableAuthService/trunk/doc/CHANGES.txt
===================================================================
--- PluggableAuthService/trunk/doc/CHANGES.txt	2006-02-25 18:26:31 UTC (rev 65455)
+++ PluggableAuthService/trunk/doc/CHANGES.txt	2006-02-25 18:51:23 UTC (rev 65456)
@@ -8,7 +8,12 @@
         404s when clicked from the README on zope.org.
         (http://www.zope.org/Members/urbanape/PluggableAuthService/Collector/6)
 
+      - Fixing up inconsistent searching in the listAvailablePrincipals
+        method of the ZODBRoleManager and ZODBGroupManager plugins. Now both
+        constrain searches by ID.
+        (http://www.zope.org/Members/urbanape/PluggableAuthService/Collector/11)
 
+
   PluggableAuthService 1.2-beta (2006/02/25)
 
     New Features

Modified: PluggableAuthService/trunk/plugins/ZODBGroupManager.py
===================================================================
--- PluggableAuthService/trunk/plugins/ZODBGroupManager.py	2006-02-25 18:26:31 UTC (rev 65455)
+++ PluggableAuthService/trunk/plugins/ZODBGroupManager.py	2006-02-25 18:51:23 UTC (rev 65456)
@@ -209,24 +209,24 @@
     #   Group assignment API
     #
     security.declareProtected( ManageGroups, 'listAvailablePrincipals' )
-    def listAvailablePrincipals( self, group_id, search_name ):
+    def listAvailablePrincipals( self, group_id, search_id ):
 
         """ Return a list of principal IDs to that can belong to the group.
 
-        o If supplied, 'search_name' constrains the principal IDs;  if not,
+        o If supplied, 'search_id' constrains the principal IDs;  if not,
           return empty list.
 
         o Omit principals with existing assignments.
         """
         result = []
 
-        if search_name:  # don't bother searching if no criteria
+        if search_id:  # don't bother searching if no criteria
 
             parent = aq_parent( self )
 
             for info in parent.searchPrincipals( max_results=20
                                                , sort_by='id'
-                                               , name=search_name
+                                               , id=search_id
                                                , exact_match=False
                                                ):
                 id = info[ 'id' ]



More information about the Zope-CVS mailing list