mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
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:

committed by
GitHub

parent
5a92411006
commit
38b9ad1d9f
@ -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) == "*" {
|
||||
|
Reference in New Issue
Block a user