expiry_date = '%d-09-30' % (datetime.date.today().year + 1)
exp_att = self._simple_map('loginExpirationTime')
+ # Alumni get extended expiry dates
+ if self.profile == 127:
+ expiry_date = '%d-09-30' % (datetime.date.today().year + 5)
# Go with the LDAP-set expiry date
- if exp_att:
+ elif exp_att:
expiry_date = "%s-%s-%s" % (exp_att[:4], exp_att[4:6], exp_att[6:8])
# Faculty and staff get a long time
elif self.profile == 111 or self.profile == 115:
'ug': 113,
'student': 113,
'gr': 112,
- 'al': 114,
- 'alumni': 114,
+ 'al': 127,
'guest': 114,
+ 'alumni': 127,
'faculty': 111,
'staff': 115,
'thorneloe': 115,
'visitor': 113
}
+ if 'alumni' in self.cname.lower():
+ # we have a winner!
+ affiliation = 'alumni'
+ return profile_map[affiliation]
+
for att in ('lulPrimaryAffiliation', 'lulStudentLevel', 'lulAffiliation'):
if att in self.ldap_atts:
affiliation = self._simple_map(att).lower()