feat(config): ui-flags endpoint driven by HELIX_SETUP_MANAGED
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

Per-tenant flag that hides self-serve setup surfaces when the product team owns onboarding for a workspace. Set HELIX_SETUP_MANAGED=true on the sidecar env for that tenant; the frontend reads this endpoint at boot, hides the Settings nav + Setup banner, and blocks /settings/* routes. Setup-state APIs stay live so ops can still drive the wizard remotely.
This commit is contained in:
2026-04-15 18:55:25 +05:30
parent 67c41f4783
commit 6adb3985cb

View File

@@ -53,4 +53,20 @@ export class SetupStateController {
const updated = this.setupState.resetState(); const updated = this.setupState.resetState();
return { ...updated, wizardRequired: this.setupState.isWizardRequired() }; return { ...updated, wizardRequired: this.setupState.isWizardRequired() };
} }
// UI-level flags the frontend reads at app boot to tailor which admin
// surfaces are available. Driven by sidecar env vars so each workspace
// can be configured independently without touching the frontend build.
//
// setupManaged=true means "the product team handles setup for this
// workspace" — hide the Settings nav, routes, and the resume-setup
// banner. The wizard + setup-state APIs stay functional for ops use
// (a support engineer can still PUT /steps/:step or hit the routes
// directly); only the end-user admin UI is hidden.
@Get('ui-flags')
uiFlags() {
return {
setupManaged: process.env.HELIX_SETUP_MANAGED === 'true',
};
}
} }