0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-03 21:48:55 -05:00

chore(console): hide the entrance of creating SAML social connector (#5013)

This commit is contained in:
Darcy Ye 2023-11-30 16:57:12 +08:00 committed by GitHub
parent f80350d2e3
commit a763d9e5a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@ import { useContext, useMemo, useState } from 'react';
import Modal from 'react-modal';
import useSWR from 'swr';
import { isDevFeaturesEnabled } from '@/consts/env';
import { TenantsContext } from '@/contexts/TenantsProvider';
import DynamicT from '@/ds-components/DynamicT';
import ModalLayout from '@/ds-components/ModalLayout';
@ -54,7 +55,12 @@ function CreateConnectorForm({ onClose, isOpen: isFormOpen, type }: Props) {
}
const allGroups = getConnectorGroups<ConnectorFactoryResponse>(
factories.filter(({ type: factoryType, isDemo }) => factoryType === type && !isDemo)
factories
.filter(({ type: factoryType, isDemo }) => factoryType === type && !isDemo)
// TODO: should remove the `isDevFeaturesEnabled` when Enterprise SSO is ready.
// Hide the entrance of adding SAML social connectors, users should go to Enterprise SSO if they want to use SAML.
// Should not remove the SAML factory from GET /connector-factories API, since that could break the existing SAML connectors.
.filter(({ id }) => isDevFeaturesEnabled || id !== 'saml')
);
return allGroups