feat: Add Support for memberOf Overlay in LDAP Server (#3068)

* feat: Allow All Users to Perform LDAP Search Lookups in their org

* feat: add ldap member of support
This commit is contained in:
Mohammad Yosefpor
2024-07-20 20:55:42 +03:30
committed by GitHub
parent 5a92411006
commit 38b9ad1d9f
2 changed files with 21 additions and 1 deletions

View File

@ -130,6 +130,9 @@ func handleSearch(w ldap.ResponseWriter, m *ldap.Message) {
e.AddAttribute("homeDirectory", message.AttributeValue("/home/"+user.Name))
e.AddAttribute("cn", message.AttributeValue(user.Name))
e.AddAttribute("uid", message.AttributeValue(user.Id))
for _, group := range user.Groups {
e.AddAttribute(ldapMemberOfAttr, message.AttributeValue(group))
}
attrs := r.Attributes()
for _, attr := range attrs {
if string(attr) == "*" {