From 021b6e32d69026606e4fbfc19c0a82910cd82905 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 7 Oct 2015 17:17:15 -0400 Subject: [PATCH] Alumni (from DN) trumps all else We need to reflect Alumni status, which comes only from the DN, rather than from the primary affiliation, etc, so trump everything else with that. Signed-off-by: Dan Scott --- tools/patron-load/ldap_osrf_sync | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/patron-load/ldap_osrf_sync b/tools/patron-load/ldap_osrf_sync index 260be8044b..ed3243b197 100755 --- a/tools/patron-load/ldap_osrf_sync +++ b/tools/patron-load/ldap_osrf_sync @@ -170,7 +170,9 @@ class User: Map LDAP record to Evergreen profile """ - if 'lulStudentLevel' in self.ldap_atts: + if 'alumni' in self.cname.lower(): + affiliation = 'alumni' + elif 'lulStudentLevel' in self.ldap_atts: affiliation = self._simple_map('lulStudentLevel').lower() elif 'lulPrimaryAffiliation' in self.ldap_atts: affiliation = self._simple_map('lulPrimaryAffiliation').lower() -- 2.11.0