feat(admin): full session material management in the session editor

See the attached file (clean name), Open (signed-URL preview), Download
(authenticated blob under the original filename), Delete (confirm, storage
object + path, errors surface), and Upload/Replace with previous-object
cleanup and upload rollback on DB failure. Admins already passed every
storage RLS gate for material writes, so no migration; this also documents
and smoke-verifies insert/read/update/delete as an impersonated admin.
Also fixes the stale e2e expectation that the speaker-portal download is an
<a href> (it became an authenticated blob button with the private bucket).

Co-authored-by: Stephan Charles <[email protected]>
Co-authored-by: Amelia Hernandez <[email protected]>
Co-authored-by: Markus Franz <[email protected]>
Co-authored-by: Sabrina Hota <[email protected]>
Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
committed 2026-10-21 21:17:02 +02:00
1 parent ea1ed87fc9
commit 5619b94c97
5 files changed
+150 -43

No files matched your search

+3 -1
View File
@@ -149,7 +149,9 @@ timezone('Europe/Amsterdam', now())`). Anything malformed or in another bucket
is denied by this policy (other buckets keep their own policies).
Registered speakers can write only their own non-service session paths; admins
retain material management access. Any authenticated attendee can read (download).
retain material management access (the admin session editor uses these same
policies for its open/download/delete/upload-on-behalf-of-speaker actions).
Any authenticated attendee can read (download).
Because the `sessions` table is admin-write only, a speaker attaches their
uploaded file via the `set_session_material` RPC (see
[rpcs.md](./rpcs.md#set_session_materialp_session_id-p_material_path--sessions)).