0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(core): block logto email connector (create and enter detail page) (#4101)

This commit is contained in:
Darcy Ye 2023-07-01 18:21:44 +08:00 committed by GitHub
parent e0ee44d5d0
commit 7afa5a4760
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@ import { connectorDirectory } from '@logto/cli/lib/constants.js';
import { getConnectorPackagesFromDirectory } from '@logto/cli/lib/utils.js'; import { getConnectorPackagesFromDirectory } from '@logto/cli/lib/utils.js';
import { import {
demoConnectorIds, demoConnectorIds,
serviceConnectorIds,
ConnectorType, ConnectorType,
type EmailConnector, type EmailConnector,
type SmsConnector, type SmsConnector,
@ -39,7 +40,8 @@ export const transpileLogtoConnector = async (
); );
const { dbEntry, metadata, type } = connector; const { dbEntry, metadata, type } = connector;
const { config, connectorId: id } = dbEntry; const { config, connectorId: id } = dbEntry;
const isDemo = demoConnectorIds.includes(id); /** Temporarily block entering Logto email connector as well until this feature is ready for prod. */
const isDemo = demoConnectorIds.includes(id) || serviceConnectorIds.includes(id);
return { return {
type, type,
@ -57,7 +59,12 @@ export const transpileConnectorFactory = ({
metadata, metadata,
type, type,
}: ConnectorFactory): ConnectorFactoryResponse => { }: ConnectorFactory): ConnectorFactoryResponse => {
return { type, ...metadata, isDemo: demoConnectorIds.includes(metadata.id) }; return {
type,
...metadata,
/** Temporarily block entering Logto email connector as well until this feature is ready for prod. */
isDemo: demoConnectorIds.includes(metadata.id) || serviceConnectorIds.includes(metadata.id),
};
}; };
const checkDuplicateConnectorFactoriesId = (connectorFactories: ConnectorFactory[]) => { const checkDuplicateConnectorFactoriesId = (connectorFactories: ConnectorFactory[]) => {