Restrict whole-event door takings to admin and organizer. #35

Merged
Michilis merged 1 commits from dev into main 2026-08-23 06:38:57 +00:00
Owner

The door session sheet showed every staff member what the event had
taken overall, by tender and against pre-sale. That is management
information, not door information, and it matches the convention
already applied to the other revenue aggregates (admin/analytics,
admin/export/financial are both admin-only).

Door staff keep their own shift cash-up: the "This session" totals are
computed on the device from its own action log, so nothing they need to
reconcile at the end of the night is lost.

The gate is on GET /api/events/:eventId/door-summary, not only on the
section that renders it -- hiding the panel while the endpoint still
returned the figures would leave them one network response away. The
client skips the request entirely for staff rather than provoking a 403.

The test auth mock previously waved every role through, so it could not
have caught a wrong gate; it now honours the role list, which also puts
several already-written assertions onto real code paths.

The door session sheet showed every staff member what the event had taken overall, by tender and against pre-sale. That is management information, not door information, and it matches the convention already applied to the other revenue aggregates (admin/analytics, admin/export/financial are both admin-only). Door staff keep their own shift cash-up: the "This session" totals are computed on the device from its own action log, so nothing they need to reconcile at the end of the night is lost. The gate is on GET /api/events/:eventId/door-summary, not only on the section that renders it -- hiding the panel while the endpoint still returned the figures would leave them one network response away. The client skips the request entirely for staff rather than provoking a 403. The test auth mock previously waved every role through, so it could not have caught a wrong gate; it now honours the role list, which also puts several already-written assertions onto real code paths.
Michilis added 1 commit 2026-08-23 06:38:43 +00:00
The door session sheet showed every staff member what the event had
taken overall, by tender and against pre-sale. That is management
information, not door information, and it matches the convention
already applied to the other revenue aggregates (admin/analytics,
admin/export/financial are both admin-only).

Door staff keep their own shift cash-up: the "This session" totals are
computed on the device from its own action log, so nothing they need to
reconcile at the end of the night is lost.

The gate is on GET /api/events/:eventId/door-summary, not only on the
section that renders it -- hiding the panel while the endpoint still
returned the figures would leave them one network response away. The
client skips the request entirely for staff rather than provoking a 403.

The test auth mock previously waved every role through, so it could not
have caught a wrong gate; it now honours the role list, which also puts
several already-written assertions onto real code paths.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Michilis merged commit 183a2c99ed into main 2026-08-23 06:38:57 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Michilis/Spanglish#35