From 87c1407923b6fbe41af0b26943fc54d047504095 Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Thu, 30 Mar 2023 10:22:45 +0300 Subject: [PATCH] chore: remove showProjectApiAccess flag (#3406) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove `showProjectApiAccess` flag ## About the changes Closes # ### Important files ## Discussion points Signed-off-by: andreas-unleash --- .../Project/ProjectSettings/ProjectSettings.tsx | 15 +++++---------- frontend/src/interfaces/uiConfig.ts | 1 - src/lib/__snapshots__/create-config.test.ts.snap | 2 -- src/lib/types/experimental.ts | 4 ---- src/server-dev.ts | 1 - 5 files changed, 5 insertions(+), 18 deletions(-) diff --git a/frontend/src/component/project/Project/ProjectSettings/ProjectSettings.tsx b/frontend/src/component/project/Project/ProjectSettings/ProjectSettings.tsx index 9ef51c0523..c54fb0debd 100644 --- a/frontend/src/component/project/Project/ProjectSettings/ProjectSettings.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/ProjectSettings.tsx @@ -17,7 +17,7 @@ export const ProjectSettings = () => { const location = useLocation(); const navigate = useNavigate(); const { uiConfig } = useUiConfig(); - const { showProjectApiAccess, projectScopedSegments } = uiConfig.flags; + const { projectScopedSegments } = uiConfig.flags; const tabs: ITab[] = [ { @@ -37,14 +37,11 @@ export const ProjectSettings = () => { id: 'change-requests', label: 'Change request configuration', }, - ]; - - if (Boolean(showProjectApiAccess)) { - tabs.push({ + { id: 'api-access', label: 'API access', - }); - } + }, + ]; const onChange = (tab: ITab) => { navigate(tab.id); @@ -71,9 +68,7 @@ export const ProjectSettings = () => { path="change-requests/*" element={} /> - {Boolean(showProjectApiAccess) && ( - } /> - )} + } /> } diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 946c87ebb0..2b6ac934c7 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -44,7 +44,6 @@ export interface IFlags { newProjectOverview?: boolean; caseInsensitiveInOperators?: boolean; crOnVariants?: boolean; - showProjectApiAccess?: boolean; proPlanAutoCharge?: boolean; notifications?: boolean; loginHistory?: boolean; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index 190d8c1005..df802fb748 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -89,7 +89,6 @@ exports[`should create default config 1`] = ` "projectScopedStickiness": false, "projectStatusApi": false, "responseTimeWithAppNameKillSwitch": false, - "showProjectApiAccess": false, "strictSchemaValidation": false, }, }, @@ -117,7 +116,6 @@ exports[`should create default config 1`] = ` "projectScopedStickiness": false, "projectStatusApi": false, "responseTimeWithAppNameKillSwitch": false, - "showProjectApiAccess": false, "strictSchemaValidation": false, }, "externalResolver": { diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 31a3c61ff4..6012013081 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -46,10 +46,6 @@ const flags = { process.env.UNLEASH_EXPERIMENTAL_CR_ON_VARIANTS, false, ), - showProjectApiAccess: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_PROJECT_API_ACCESS, - false, - ), strictSchemaValidation: parseEnvVarBoolean( process.env.UNLEASH_STRICT_SCHEMA_VALIDTION, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index da331be67e..1224ffed3d 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -41,7 +41,6 @@ process.nextTick(async () => { newProjectOverview: true, bulkOperations: true, projectStatusApi: true, - showProjectApiAccess: true, projectScopedSegments: true, projectScopedStickiness: true, optimal304: true,