From 8e9a7cb8e9207a3414a0fb2d9686bc562278a0fd Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Thu, 27 Oct 2016 11:16:40 -0400 Subject: [PATCH] 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 --- tools/patron-load/ldap_osrf_sync | 3 +++ 1 file changed, 3 insertions(+) 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: -- 2.11.0