From: Dan Scott Date: Wed, 7 Oct 2015 21:17:15 +0000 (-0400) Subject: Alumni (from DN) trumps all else X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=021b6e32d69026606e4fbfc19c0a82910cd82905;p=contrib%2FConifer.git 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 --- 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()