From 11648aac2ff5234276b7ec4dc9f7ff9154d34325 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Fri, 7 Oct 2022 16:22:23 +0200 Subject: [PATCH] chore(ldap): allow login with fraport personnel number --- src/Auth/LDAP.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Auth/LDAP.hs b/src/Auth/LDAP.hs index 1990b40a3..2019e2d37 100644 --- a/src/Auth/LDAP.hs +++ b/src/Auth/LDAP.hs @@ -59,8 +59,10 @@ findUser conf@LdapConf{..} ldap ident retAttrs = fromMaybe [] <$> findM (assertM [ ldapUserEmail' Ldap.:= Text.encodeUtf8 ident' | ident' <- [ident, [st|#{ident}@lmu.de|], [st|#{ident}@fraport.de|]] , ldapUserEmail' <- toList ldapUserEmail + -- ] ++ + -- [ ldapUserDisplayName Ldap.:= Text.encodeUtf8 ident ] ++ - [ ldapUserDisplayName Ldap.:= Text.encodeUtf8 ident + [ ldapUserFraportPersonalnummer Ldap.:= Text.encodeUtf8 ident -- for Fraport, userDisplayname has pattern "Surname, Firstnames" ] findUserMatr :: LdapConf -> Ldap -> Text -> [Ldap.Attr] -> IO [Ldap.SearchEntry]