From 391e37d49e3cbe388c5476ac221c0cbce457a5e8 Mon Sep 17 00:00:00 2001 From: Vladyslav Matsiiako Date: Wed, 14 Jun 2023 21:27:37 -0700 Subject: [PATCH] fixed bugs with env and password reset --- backend/src/ee/services/EELicenseService.ts | 4 +--- frontend/src/components/login/InitialLoginStep.tsx | 10 ++++++++-- frontend/src/hooks/api/subscriptions/types.ts | 2 +- .../ProjectSettingsPage/ProjectSettingsPage.tsx | 7 +++---- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/backend/src/ee/services/EELicenseService.ts b/backend/src/ee/services/EELicenseService.ts index e8fe9253e..89e71e57b 100644 --- a/backend/src/ee/services/EELicenseService.ts +++ b/backend/src/ee/services/EELicenseService.ts @@ -30,7 +30,6 @@ interface FeatureSet { customRateLimits: boolean; customAlerts: boolean; auditLogs: boolean; - envLimit?: number | null; } /** @@ -60,8 +59,7 @@ class EELicenseService { rbac: true, customRateLimits: true, customAlerts: true, - auditLogs: false, - envLimit: null + auditLogs: false } public localFeatureSet: NodeCache; diff --git a/frontend/src/components/login/InitialLoginStep.tsx b/frontend/src/components/login/InitialLoginStep.tsx index 77e83434e..3dcdf968b 100644 --- a/frontend/src/components/login/InitialLoginStep.tsx +++ b/frontend/src/components/login/InitialLoginStep.tsx @@ -76,7 +76,7 @@ export default function InitialLoginStep({ {t('login.continue-with-google')} */} -
+
-
+
{t('login.create-account')}
+
+ Forgot password? + + Recover your account + +
} diff --git a/frontend/src/hooks/api/subscriptions/types.ts b/frontend/src/hooks/api/subscriptions/types.ts index 61736b4f4..af1b315d1 100644 --- a/frontend/src/hooks/api/subscriptions/types.ts +++ b/frontend/src/hooks/api/subscriptions/types.ts @@ -12,5 +12,5 @@ export type SubscriptionPlan = { tier: number; workspaceLimit: number; workspacesUsed: number; - envLimit: number; + environmentLimit: number; }; diff --git a/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx b/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx index ee9b85cc5..808a74bd8 100644 --- a/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx +++ b/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx @@ -41,12 +41,11 @@ import { CreateServiceToken, CreateUpdateEnvFormData, CreateWsTag, + E2EESection, EnvironmentSection, ProjectIndexSecretsSection, ProjectNameChangeSection, - ServiceTokenSection, - E2EESection -} from './components'; + ServiceTokenSection} from './components'; export const ProjectSettingsPage = () => { const { t } = useTranslation(); @@ -91,7 +90,7 @@ export const ProjectSettingsPage = () => { // get user subscription const { subscription } = useSubscription(); const host = window.location.origin; - const isEnvServiceAllowed = ((currentWorkspace?.environments || []).length < (subscription?.envLimit || 3) || host !== 'https://app.infisical.com'); + const isEnvServiceAllowed = (((currentWorkspace?.environments || []).length < (subscription?.environmentLimit || 3)) || host !== 'https://app.infisical.com'); const onRenameWorkspace = async (name: string) => { try {