Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/packages/console-shared/src/constants/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export enum FLAGS {
CONSOLE_CAPABILITY_GETTINGSTARTEDBANNER_IS_ENABLED = 'CONSOLE_CAPABILITY_GETTINGSTARTEDBANNER_IS_ENABLED',
LIGHTSPEED_IS_AVAILABLE_TO_INSTALL = 'LIGHTSPEED_IS_AVAILABLE_TO_INSTALL',
DEVCONSOLE_PROXY = 'DEVCONSOLE_PROXY',
IMPERSONATE = 'IMPERSONATE',
}

export const CONFIG_STORAGE_CONSOLE = 'console';
Expand Down
13 changes: 13 additions & 0 deletions frontend/public/reducers/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ export const defaults = _.mapValues(FLAGS, (flag) => {
);
case FLAGS.DEVCONSOLE_PROXY:
return true;
case FLAGS.IMPERSONATE: {
// FIXME: Check localStorage for override, default to false (disabled)
// This is the flag for the multi-group impersonation feature.
const localStorageValue = localStorage.getItem('bridge/impersonate-enabled');
if (localStorageValue === 'true') {
// eslint-disable-next-line no-console
console.log('[Feature Flag] Impersonation enabled via localStorage');
return true;
}
// eslint-disable-next-line no-console
console.log('[Feature Flag] Impersonation disabled (default or localStorage=false)');
return false;
}
default:
return undefined;
}
Expand Down