1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-31 13:47:02 +02:00

chore: add a toggle for project segments (#3272)

## About the changes
This adds a new flag that can be used in the UI to display project
specific segments
This commit is contained in:
Gastón Fournier 2023-03-08 14:55:03 +01:00 committed by GitHub
parent 068c55a925
commit 7c289369cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 0 deletions

View File

@ -48,6 +48,7 @@ export interface IFlags {
proPlanAutoCharge?: boolean; proPlanAutoCharge?: boolean;
notifications?: boolean; notifications?: boolean;
loginHistory?: boolean; loginHistory?: boolean;
projectScopedSegments?: boolean;
} }
export interface IVersionInfo { export interface IVersionInfo {

View File

@ -80,6 +80,7 @@ exports[`should create default config 1`] = `
"newProjectOverview": false, "newProjectOverview": false,
"notifications": false, "notifications": false,
"proPlanAutoCharge": false, "proPlanAutoCharge": false,
"projectScopedSegments": false,
"projectStatusApi": false, "projectStatusApi": false,
"proxyReturnAllToggles": false, "proxyReturnAllToggles": false,
"responseTimeWithAppNameKillSwitch": false, "responseTimeWithAppNameKillSwitch": false,
@ -102,6 +103,7 @@ exports[`should create default config 1`] = `
"newProjectOverview": false, "newProjectOverview": false,
"notifications": false, "notifications": false,
"proPlanAutoCharge": false, "proPlanAutoCharge": false,
"projectScopedSegments": false,
"projectStatusApi": false, "projectStatusApi": false,
"proxyReturnAllToggles": false, "proxyReturnAllToggles": false,
"responseTimeWithAppNameKillSwitch": false, "responseTimeWithAppNameKillSwitch": false,

View File

@ -64,6 +64,10 @@ const flags = {
), ),
notifications: parseEnvVarBoolean(process.env.NOTIFICATIONS, false), notifications: parseEnvVarBoolean(process.env.NOTIFICATIONS, false),
loginHistory: parseEnvVarBoolean(process.env.UNLEASH_LOGIN_HISTORY, false), loginHistory: parseEnvVarBoolean(process.env.UNLEASH_LOGIN_HISTORY, false),
projectScopedSegments: parseEnvVarBoolean(
process.env.PROJECT_SCOPED_SEGMENTS,
false,
),
}; };
export const defaultExperimentalOptions: IExperimentalOptions = { export const defaultExperimentalOptions: IExperimentalOptions = {

View File

@ -42,6 +42,7 @@ process.nextTick(async () => {
newProjectOverview: true, newProjectOverview: true,
projectStatusApi: true, projectStatusApi: true,
showProjectApiAccess: true, showProjectApiAccess: true,
projectScopedSegments: true,
}, },
}, },
authentication: { authentication: {