mirror of
https://github.com/goharbor/harbor.git
synced 2024-10-31 23:59:32 +01:00
modify ldap filter
This commit is contained in:
parent
9bbdbfa520
commit
1c09e1fc1c
@ -77,7 +77,7 @@ func (l *Auth) Authenticate(m models.AuthModel) (*models.User, error) {
|
||||
attrName := os.Getenv("LDAP_UID")
|
||||
filter := os.Getenv("LDAP_FILTER")
|
||||
if filter != "" {
|
||||
filter = "(&(" + filter + ")(" + attrName + "=" + m.Principal + "))"
|
||||
filter = "(&" + filter + "(" + attrName + "=" + m.Principal + "))"
|
||||
} else {
|
||||
filter = "(" + attrName + "=" + m.Principal + ")"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user