From a0a1024e0093144114c99421baaa5f3dc71a650c Mon Sep 17 00:00:00 2001 From: jens Date: Wed, 27 Jan 2010 11:09:56 +0000 Subject: [PATCH] - Feature: The enumerateUsers method has a parameter "exact_match" that was only applied if the search was by logn or user id, since that is the way it is used in the standard PluggableAuthService plugins. However, the user folder searchUsers method can accept this parameter as well and thus limit searches by other criteria to exact matches. This is useful enough to implement, even though it breaks the standard. (http://www.dataflake.org/tracker/issue_00656) git-svn-id: http://svn.dataflake.org/svn/Products.LDAPMultiPlugins/trunk@1877 835909ba-7c00-0410-bfa4-884f43845301 --- Products/LDAPMultiPlugins/CHANGES.txt | 8 ++++++++ Products/LDAPMultiPlugins/LDAPMultiPlugin.py | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Products/LDAPMultiPlugins/CHANGES.txt b/Products/LDAPMultiPlugins/CHANGES.txt index 88b679f..bac1c47 100644 --- a/Products/LDAPMultiPlugins/CHANGES.txt +++ b/Products/LDAPMultiPlugins/CHANGES.txt @@ -6,6 +6,14 @@ To see earlier changes please see HISTORY.txt. 1.9 (unreleased) ---------------- +- Feature: The enumerateUsers method has a parameter "exact_match" that + was only applied if the search was by logn or user id, since that is + the way it is used in the standard PluggableAuthService plugins. + However, the user folder searchUsers method can accept this parameter + as well and thus limit searches by other criteria to exact matches. + This is useful enough to implement, even though it breaks the standard. + (http://www.dataflake.org/tracker/issue_00656) + 1.8 (2009-02-17) ---------------- diff --git a/Products/LDAPMultiPlugins/LDAPMultiPlugin.py b/Products/LDAPMultiPlugins/LDAPMultiPlugin.py index 4579fed..84724b2 100644 --- a/Products/LDAPMultiPlugins/LDAPMultiPlugin.py +++ b/Products/LDAPMultiPlugins/LDAPMultiPlugin.py @@ -225,7 +225,9 @@ class LDAPMultiPlugin(LDAPPluginBase): if not login and not id: ldap_criteria[login_attr] = '' - l_results = acl.searchUsers(**ldap_criteria) + l_results = acl.searchUsers( exact_match=exact_match + , **ldap_criteria + ) for l_res in l_results: