mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
fix(settings): keep the health-record entry reachable regardless of the doctorReport opt-out
The health-record section (PDF + FHIR R4 export) was the only entry-point gated on the doctorReport module's nav toggle, so flipping that opt-out in the Modules hub made the whole section vanish from Settings with no in-context way back. Drop the nav gate: the entry-point now always shows. The doctorReport module still governs the data layer — the server-side /api/export/health-record route stays the hard enforcement (403 module.disabled over Bearer when opted out). Assert the entry shows for a default, empty, and opted-out modules map.
This commit is contained in:
1 parent
6f866ff1c6
commit
dae7138fc6
3 files changed
+28
-14
No files matched your search
@@ -177,15 +177,21 @@ export const SETTINGS_SECTIONS: readonly SettingsSection[] = [
|
||||
},
|
||||
{ slug: "api", titleKey: "settings.sections.api.title", icon: KeyRound },
|
||||
// v1.18.0 (S5) — the full health record (PDF + FHIR R4 + zip package)
|
||||
// earns its own home, lifted out of Export & Import. Gated on the
|
||||
// `doctorReport` module: when the user turns the doctor-report surface off,
|
||||
// the entry hides (the server-side `/api/export/health-record` gate is the
|
||||
// hard enforcement; this hides the entry-point to match).
|
||||
// earns its own home, lifted out of Export & Import.
|
||||
//
|
||||
// v1.18.6.1 — the nav entry is NOT module-gated. The health record is a
|
||||
// flagship export capability; gating its only entry-point on the
|
||||
// `doctorReport` opt-out meant a stray toggle in the Modules hub made the
|
||||
// whole section vanish with no in-context way back. The entry now always
|
||||
// shows. The `doctorReport` module still governs the data layer: the
|
||||
// server-side `/api/export/health-record` route remains the hard
|
||||
// enforcement (403 `module.disabled` over Bearer when the account opts
|
||||
// out), and the Modules hub keeps the toggle for anyone who wants the
|
||||
// surface gone elsewhere — but the Settings entry-point stays reachable.
|
||||
{
|
||||
slug: "gesundheitsakte",
|
||||
titleKey: "settings.sections.gesundheitsakte.title",
|
||||
icon: FileHeart,
|
||||
moduleGate: "doctorReport",
|
||||
},
|
||||
{
|
||||
slug: "export",
|
||||
|
||||
Reference in new issue
Block a user