0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

feat(console): add mfa to plan quota table (#4732)

This commit is contained in:
Xiao Yijun 2023-10-24 14:56:48 +08:00 committed by GitHub
parent 43b35c71ba
commit 5cfb478715
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,3 +1,5 @@
import { conditionalArray } from '@silverhand/essentials';
import { import {
type SubscriptionPlanTable, type SubscriptionPlanTable,
type SubscriptionPlanTableData, type SubscriptionPlanTableData,
@ -6,6 +8,7 @@ import {
ReservedPlanName, ReservedPlanName,
} from '@/types/subscriptions'; } from '@/types/subscriptions';
import { isDevFeaturesEnabled as isDevelopmentFeaturesEnabled } from './env';
import { ReservedPlanId } from './subscriptions'; import { ReservedPlanId } from './subscriptions';
type EnabledFeatureMap = Record<string, boolean | undefined>; type EnabledFeatureMap = Record<string, boolean | undefined>;
@ -95,6 +98,7 @@ const enterprisePlanTable: SubscriptionPlanTable = {
appLogoAndFaviconEnabled: true, appLogoAndFaviconEnabled: true,
darkModeEnabled: true, darkModeEnabled: true,
i18nEnabled: true, i18nEnabled: true,
mfaEnabled: true,
omniSignInEnabled: true, omniSignInEnabled: true,
passwordSignInEnabled: true, passwordSignInEnabled: true,
passwordlessSignInEnabled: true, passwordlessSignInEnabled: true,
@ -132,6 +136,7 @@ export const planTableGroupKeyMap: SubscriptionPlanTableGroupKeyMap = Object.fre
'i18nEnabled', 'i18nEnabled',
], ],
[SubscriptionPlanTableGroupKey.userAuthentication]: [ [SubscriptionPlanTableGroupKey.userAuthentication]: [
...conditionalArray(isDevelopmentFeaturesEnabled && 'mfaEnabled'),
'omniSignInEnabled', 'omniSignInEnabled',
'passwordSignInEnabled', 'passwordSignInEnabled',
'passwordlessSignInEnabled', 'passwordlessSignInEnabled',