Quick fix for ldap.

This commit is contained in:
Dan 2021-12-02 12:19:36 -05:00
parent acf4b5596e
commit 5cf011f1d9
1 changed files with 1 additions and 2 deletions

View File

@ -14,8 +14,7 @@ class LdapService(object):
attributes = ['uid', 'cn', 'sn', 'displayName', 'givenName', 'mail', 'objectClass', 'UvaDisplayDepartment',
'telephoneNumber', 'title', 'uvaPersonIAMAffiliation', 'uvaPersonSponsoredType']
uid_search_string = "(&(objectclass=person)(uid=%s))"
# adding a '*' to the end of uid here would match partial uid, but it is too slow on the new ldap server.
user_or_last_name_search = "(&(objectclass=person)(|(uid=%s)(sn=%s*)))"
user_or_last_name_search = "(&(objectclass=person)(|(uid=%s*)(sn=%s*)))"
cn_single_search = '(&(objectclass=person)(cn=%s*))'
cn_double_search = '(&(objectclass=person)(&(cn=%s*)(cn=*%s*)))'
temp_cache = {}