From 6dc16bd90b8fab0acac96a7925a7d087bf8532b9 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 14 Sep 2011 16:03:08 -0400 Subject: [PATCH] Use the new opt_in_override method to search for users Now that we have the opt_in_override method, use it to find users who might exist in any OU in the consortium, rather than just the workstation OU. Signed-off-by: Dan Scott --- tools/patron-load/ldap_osrf_sync | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/patron-load/ldap_osrf_sync b/tools/patron-load/ldap_osrf_sync index 8722e33f6b..a79b40536c 100755 --- a/tools/patron-load/ldap_osrf_sync +++ b/tools/patron-load/ldap_osrf_sync @@ -346,6 +346,8 @@ def find_evergreen_user(auth, user): Returns user ID if found, None if not """ + # Custom search method - overrides opt-in visibility, as it suggests + search_method = 'open-ils.actor.patron.search.advanced.opt_in_override' limit = 1 sort = None search_depth = 1 @@ -356,7 +358,7 @@ def find_evergreen_user(auth, user): ) by_id = osrf_request( - 'open-ils.actor', 'open-ils.actor.patron.search.advanced', + 'open-ils.actor', search_method, auth, {'ident_value': {'value': user.ident_value, 'group': 0}}, limit, sort, include_inactive, search_depth ).send() @@ -365,7 +367,7 @@ def find_evergreen_user(auth, user): return by_id[0] by_email = osrf_request( - 'open-ils.actor', 'open-ils.actor.patron.search.advanced', + 'open-ils.actor', search_method, auth, {'email': {'value': user.email}}, limit, sort, include_inactive, search_depth ).send() @@ -374,7 +376,7 @@ def find_evergreen_user(auth, user): return by_email[0] by_usrname = osrf_request( - 'open-ils.actor', 'open-ils.actor.patron.search.advanced', + 'open-ils.actor', search_method, auth, {'usrname': {'value': user.usrname}}, limit, sort, include_inactive, search_depth ).send() -- 2.11.0