feat: change LDAP attribute from cn to title for correct username mapping (#3378)

This commit is contained in:
ming.zhang
2024-11-26 09:13:05 +08:00
committed by GitHub
parent a45d2b87c1
commit 12b4d1c7cd

View File

@ -142,7 +142,7 @@ func handleSearch(w ldap.ResponseWriter, m *ldap.Message) {
}
for _, attr := range attrs {
e.AddAttribute(message.AttributeDescription(attr), getAttribute(string(attr), user))
if string(attr) == "cn" {
if string(attr) == "title" {
e.AddAttribute(message.AttributeDescription(attr), getAttribute("title", user))
}
}