Point the app at org 107295 and park the agent app
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4eeababec8
commit
3edbbe64ff
+1
-1
@@ -32,7 +32,7 @@ export const env = {
|
||||
/** Every documented endpoint lives under this prefix. */
|
||||
apiBaseUrl: `${API_ORIGIN}/api/v1`,
|
||||
/** Organisation the app is branded for; sent at registration and at sign-in. */
|
||||
orgId: 'ORG001',
|
||||
orgId: '107295',
|
||||
/**
|
||||
* Modules with no backend behind them yet — cards, loans, insurance, deposits,
|
||||
* the dashboard and the agent app — still resolve from fixtures. Registration,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FeatureKey } from '../constants/featureKeys';
|
||||
import { FeatureKey } from '../constants/featureKeys';
|
||||
import type { FeatureDefinition, FeatureOverrides } from './types';
|
||||
|
||||
/**
|
||||
@@ -22,7 +22,14 @@ export const DEFAULT_FEATURE_CONFIG: Record<FeatureKey, FeatureDefinition> = {
|
||||
[FeatureKey.AUTH]: { enabled: true, description: 'Authentication module' },
|
||||
[FeatureKey.AUTH_LOGIN]: { enabled: true },
|
||||
[FeatureKey.AUTH_LOGIN_USER_ROLE]: { enabled: true, description: 'Customer login tab' },
|
||||
[FeatureKey.AUTH_LOGIN_AGENT_ROLE]: { enabled: true, description: 'Agent login tab' },
|
||||
[FeatureKey.AUTH_LOGIN_AGENT_ROLE]: {
|
||||
enabled: false,
|
||||
description: 'Agent login tab',
|
||||
reason:
|
||||
'Off with the agent app itself. This key is not under `agent`, so it does not ' +
|
||||
'inherit that kill — left on, the tab would offer a role whose app no longer ' +
|
||||
'exists, and RootNavigator would drop the agent into the customer app instead.',
|
||||
},
|
||||
[FeatureKey.AUTH_LOGIN_BIOMETRIC]: { enabled: true },
|
||||
[FeatureKey.AUTH_LOGIN_FORGOT_PASSWORD]: { enabled: true },
|
||||
[FeatureKey.AUTH_REGISTER]: {
|
||||
@@ -251,7 +258,14 @@ export const DEFAULT_FEATURE_CONFIG: Record<FeatureKey, FeatureDefinition> = {
|
||||
},
|
||||
|
||||
// --------------------------------------------------------------- Agent ----
|
||||
[FeatureKey.AGENT]: { enabled: true, description: 'Field-agent application' },
|
||||
[FeatureKey.AGENT]: {
|
||||
enabled: false,
|
||||
description: 'Field-agent application',
|
||||
reason:
|
||||
'Parked for now. Disabling this root retires the whole agent app — the 24 keys ' +
|
||||
'below inherit it, so they are left as they are and the module comes back in ' +
|
||||
'one edit. Pair with `auth.login.agentRole`, which sits outside this subtree.',
|
||||
},
|
||||
|
||||
[FeatureKey.AGENT_DASHBOARD]: { enabled: true },
|
||||
[FeatureKey.AGENT_DASHBOARD_MAIN]: { enabled: true },
|
||||
|
||||
@@ -69,6 +69,11 @@ describe('featureService', () => {
|
||||
|
||||
it('disables a single child without touching its parent or siblings', () => {
|
||||
featureService.setSource(FeatureSource.Remote, {
|
||||
// The agent app ships disabled, so its root is turned on here rather than
|
||||
// assumed. This test is about child-level isolation, not about which
|
||||
// products happen to be switched on in the static config — leaving that
|
||||
// implicit is what made it fail the day the agent app was parked.
|
||||
[FeatureKey.AGENT]: true,
|
||||
[FeatureKey.AGENT_CUSTOMERS_CREATE]: false,
|
||||
[FeatureKey.AGENT_CUSTOMERS_DELETE]: false,
|
||||
});
|
||||
@@ -208,6 +213,10 @@ describe('guardFeature', () => {
|
||||
});
|
||||
|
||||
it('runs the action while the feature is enabled', () => {
|
||||
// Same reason as above: the key is a fixture for the guard's behaviour, so
|
||||
// its subtree is enabled explicitly rather than inherited from the config.
|
||||
featureService.setSource(FeatureSource.Remote, { [FeatureKey.AGENT]: true });
|
||||
|
||||
const action = jest.fn(() => 'ran');
|
||||
const guarded = guardFeature(FeatureKey.AGENT_CUSTOMERS_DELETE, action);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user