Modify the LDAP service to only use lowercase UIDs.

UVA always returns the UID as lowercase.
This caused a postgres unique value problem for us.
This commit is contained in:
mike cullerton 2021-07-22 10:46:09 -04:00
parent 428802b9d0
commit 8df1145471
1 changed files with 1 additions and 0 deletions

View File

@ -58,6 +58,7 @@ class LdapService(object):
@staticmethod
def user_info(uva_uid):
uva_uid = uva_uid.lower()
user_info = db.session.query(LdapModel).filter(LdapModel.uid == uva_uid).first()
if not user_info:
app.logger.info("No cache for " + uva_uid)