mirror of https://github.com/portainer/portainer
fix(settings/authentication): patch LDAP connectivity check (#3561)
parent
d3a625e22f
commit
1f7e5fec4f
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/portainer/portainer/api"
|
||||
portainer "github.com/portainer/portainer/api"
|
||||
"github.com/portainer/portainer/api/crypto"
|
||||
|
||||
"gopkg.in/ldap.v2"
|
||||
|
@ -178,11 +178,9 @@ func (*Service) TestConnectivity(settings *portainer.LDAPSettings) error {
|
|||
}
|
||||
defer connection.Close()
|
||||
|
||||
if !settings.AnonymousMode {
|
||||
err = connection.Bind(settings.ReaderDN, settings.Password)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = connection.Bind(settings.ReaderDN, settings.Password)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue