1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

chore: move google auth ui behind flag (#3606)

Moves the access tab for Google Auth behind a flag. The elements
are still accessible but hidden by default so this is a soft change.
This is a deprecated feature and is on its way out.
This commit is contained in:
Simon Hornby 2023-04-26 10:55:55 +02:00 committed by GitHub
parent 1fdf68eeec
commit 9521c452c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import { TabNav } from 'component/common/TabNav/TabNav/TabNav';
export const AuthSettings = () => {
const { authenticationType } = useUiConfig().uiConfig;
const { uiConfig } = useUiConfig();
const tabs = [
{
@ -29,7 +30,9 @@ export const AuthSettings = () => {
label: 'Google',
component: <GoogleAuth />,
},
];
].filter(
item => uiConfig.flags?.googleAuthEnabled || item.label !== 'Google'
);
return (
<div>

View File

@ -51,6 +51,7 @@ export interface IFlags {
demo?: boolean;
strategyTitle?: boolean;
groupRootRoles?: boolean;
googleAuthEnabled?: boolean;
}
export interface IVersionInfo {

View File

@ -75,6 +75,7 @@ exports[`should create default config 1`] = `
"embedProxy": true,
"embedProxyFrontend": true,
"featuresExportImport": true,
"googleAuthEnabled": false,
"groupRootRoles": false,
"maintenanceMode": false,
"messageBanner": false,
@ -101,6 +102,7 @@ exports[`should create default config 1`] = `
"embedProxy": true,
"embedProxyFrontend": true,
"featuresExportImport": true,
"googleAuthEnabled": false,
"groupRootRoles": false,
"maintenanceMode": false,
"messageBanner": false,

View File

@ -80,6 +80,10 @@ const flags = {
process.env.UNLEASH_STRATEGY_TITLE,
false,
),
googleAuthEnabled: parseEnvVarBoolean(
process.env.GOOGLE_AUTH_ENABLED,
false,
),
};
export const defaultExperimentalOptions: IExperimentalOptions = {