From: Dan Scott Date: Thu, 27 Oct 2016 15:16:40 +0000 (-0400) Subject: Skip NO_COLLEAGUE_ID situation X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8e9a7cb8e9207a3414a0fb2d9686bc562278a0fd;p=contrib%2FConifer.git Skip NO_COLLEAGUE_ID situation Rather than literally using "NO_COLLEAGUE_ID" as the colleague ID, refuse to create or update the corresponding record. Any LDAP records created through the normal process should have colleague IDs, even for visitors/guests. Signed-off-by: Dan Scott --- diff --git a/tools/patron-load/ldap_osrf_sync b/tools/patron-load/ldap_osrf_sync index 188899d41e..7deb46c448 100755 --- a/tools/patron-load/ldap_osrf_sync +++ b/tools/patron-load/ldap_osrf_sync @@ -340,6 +340,9 @@ def find_ldap_users(con, ldap_filter, attributes, auth): if ARGS.dump_ldap: dump_data(raw_atts) print("dn = '%s'" % (raw_user)) + if user.ident_value == 'NO_COLLEAGUE_ID': + print >> sys.stderr, "No colleague ID: skipping" + continue if ARGS.create_users: res = create_evergreen_user(auth, user) if res: