Skip to content

Commit 4d57598

Browse files
Fix 'ritDn' parser for active member export button
As of 2018-09-01 the ritDn field in LDAP contains data in the following format: ABC1234 Rather than the older (and incorrect in terms of DNs) format: uid=ABC1234,ou=people,dc=rit,dc=edu This fixes an issue where accounts created under the new FreeIPA infrastructure would populate the ritDn field with the uid of the member in respect to their RIT account, but not in a full dn format.
1 parent 912e046 commit 4d57598

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

conditional/blueprints/member_management.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import csv
22
import io
3-
import re
43

54
from datetime import datetime
65

@@ -626,7 +625,8 @@ def export_active_list():
626625
active_list = [["Full Name", "RIT Username", "Amount to Charge"]]
627626
for member in ldap_get_active_members():
628627
full_name = member.cn
629-
rit_username = re.search(".*uid=(\\w*)", member.ritDn).group(1)
628+
# XXX[ljm] this should be renamed in LDAP/IPA schema to be ritUid
629+
rit_username = member.ritDn
630630
will_coop = CurrentCoops.query.filter(
631631
CurrentCoops.date_created > start_of_year(),
632632
CurrentCoops.uid == member.uid).first()

0 commit comments

Comments
 (0)