SSO: Register LDAP service if LDAP is enabled in SSO settings (#90228)

register LDAP service if LDAP is enabled in SSO settings
This commit is contained in:
Mihai Doarna 2024-07-11 13:53:43 +03:00 committed by GitHub
parent b09798c3fa
commit bbd1611265
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,10 @@ func ProvideRegistration(
var proxyClients []authn.ProxyClient
var passwordClients []authn.PasswordClient
if cfg.LDAPAuthEnabled {
// always register LDAP if LDAP is enabled in SSO settings
ssoSettingsLDAP := features.IsEnabledGlobally(featuremgmt.FlagSsoSettingsApi) && features.IsEnabledGlobally(featuremgmt.FlagSsoSettingsLDAP)
if cfg.LDAPAuthEnabled || ssoSettingsLDAP {
ldap := clients.ProvideLDAP(cfg, ldapService, userService, authInfoService)
proxyClients = append(proxyClients, ldap)
passwordClients = append(passwordClients, ldap)