diff --git a/VERSION.txt b/VERSION.txt index af0b7dd..238d6e8 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.0.6 +1.0.7 diff --git a/ceod/model/UWLDAPService.py b/ceod/model/UWLDAPService.py index b9ace31..625c566 100644 --- a/ceod/model/UWLDAPService.py +++ b/ceod/model/UWLDAPService.py @@ -37,10 +37,18 @@ class UWLDAPService: conn = self._get_conn() conn.search( - self.uwldap_base, filter_str, attributes=['ou'], + self.uwldap_base, filter_str, attributes=['ou', 'uid'], size_limit=len(usernames)) for entry in conn.entries: - uid = dn_to_uid(entry.entry_dn) + # some records in UWLDAP have two UIDs because UIDs + # were historically limited to 8 characters + uid = None + for uw_uid in entry.uid.values: + if uw_uid in user_indices: + uid = uw_uid + break + # sanity check + assert uid is not None idx = user_indices[uid] program = entry.ou.value if program: diff --git a/debian/changelog b/debian/changelog index 6e7f5b6..5015e7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ceo (1.0.7-buster1) buster; urgency=medium + + * Fix bug in UWLDAP get_programs_for_users. + + -- Max Erenberg Tue, 02 Nov 2021 22:56:24 +0000 + ceo (1.0.6-buster1) buster; urgency=medium * Fix bug in sender email address.