mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
SSO LDAP: Fix ldap provider in providers list (#93472)
* Correct comment about provider filter * Add type for LDAP provider * Ignore old LDAP init setup when using SSO
This commit is contained in:
parent
362ffff591
commit
63195664f4
@ -52,9 +52,16 @@ export const AuthConfigPageUnconnected = ({
|
||||
reportInteraction('authentication_ui_provider_clicked', { provider: providerType, enabled });
|
||||
};
|
||||
|
||||
// filter out saml and ldap from sso providers because it is already included in availableProviders
|
||||
// filter out saml from sso providers because it is already included in availableProviders
|
||||
providers = providers.filter((p) => p.provider !== 'saml');
|
||||
|
||||
providers = providers.map((p) => {
|
||||
if (p.provider === 'ldap') {
|
||||
p.settings.type = p.provider;
|
||||
}
|
||||
return p;
|
||||
});
|
||||
|
||||
const providerList = availableProviders.length
|
||||
? [
|
||||
...availableProviders.map((p) => ({
|
||||
|
@ -1,3 +1,4 @@
|
||||
import config from 'app/core/config';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { getBackendSrv } from 'app/core/services/backend_srv';
|
||||
import { AccessControlAction, Settings, SettingsSection } from 'app/types';
|
||||
@ -51,6 +52,11 @@ export async function getAuthProviderStatus(providerId: string): Promise<AuthPro
|
||||
}
|
||||
|
||||
export function initAuthConfig() {
|
||||
// skip the LDAP provider if it is enabled by SSO settings
|
||||
if (config.featureToggles.ssoSettingsApi && config.featureToggles.ssoSettingsLDAP) {
|
||||
return;
|
||||
}
|
||||
|
||||
const ldapAuthProvider: AuthProviderInfo = {
|
||||
id: 'ldap',
|
||||
type: 'LDAP',
|
||||
|
Loading…
Reference in New Issue
Block a user