feat(sessions): material downloads unlock when the session ends

Private materials bucket + RLS read gate (admins/own speakers anytime, all
attendees after the scheduled slot end, event-local Amsterdam time); always
visible uploaded-state, locked download panel, authenticated client downloads,
admin signed URLs. 12 new assertions in material_time_lock_tests.sql.
This commit is contained in:
Lago committed 2026-10-21 18:57:15 +02:00
1 parent a2b87602b4
commit d4e4637e7c
13 files changed
+334 -30

No files matched your search

+4 -2
View File
@@ -80,8 +80,10 @@ client-side to avoid leaking other people's data:
- **`groupAgenda(rows)`** — turns the flat `get_agenda()` rows into
`{ slot, sessions[] }[]` ordered by slot id. Used by `useEvent()`.
- **`sessionMaterialUrl(path)`** — builds the public URL for a session material
in the `materials` bucket.
- **`downloadSessionMaterial(path)`** — downloads a material file through
authenticated storage (private bucket; server-side RLS allows it for the
session's speakers/admins anytime, everyone else after the session ended).
**`materialFilename(path)`** strips the `sessions/<id>/<ts>-` prefix.
## Admin Email Entry