mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Six page gates read `inSharedRecord || user?.modules?.X`, with a comment saying the delegate's own module map does not govern the owner's record. That was true when it was written and stopped being true in v1.38.14: `GET /api/auth/me` now publishes the RECORD's map, masked to what the grant opens, so the prefix that protected against reading the wrong map now widens the gate instead. The navigation drops the entry correctly while a typed URL still renders the page for a record whose owner switched the module off, and `/api/vaccinations` carries no module gate of its own, so it renders and works. Deleting the prefix answers both cases from the one map, which is what it is for. A structural guard holds the six expressions: it locates each gate, proves it is a module gate, and then asserts it does not widen on the sharing question. It finds nothing to assert on if the expression moves, and says so, rather than passing on an empty match. All six legs fail against the previous gates.