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:
1 parent
ea1ed87fc9
commit
5619b94c97
5 files changed
+150
-43
No files matched your search
@@ -284,8 +284,24 @@ event uses, but the `category` is `admin` so manual adjustments are auditable in
|
||||
|
||||
### Session material
|
||||
|
||||
The Schedule view uploads a session's material to the `materials` bucket and sets
|
||||
`sessions.material_path` (admins can write `sessions` directly).
|
||||
The session editor in the Schedule view manages a session's material in the
|
||||
private `materials` bucket — admins can act **on behalf of a speaker** at any
|
||||
time (storage RLS lets `is_admin()` read, insert, update and delete, bypassing
|
||||
the attendee time-lock):
|
||||
|
||||
- **See** — the current file is shown with its clean name (the
|
||||
`sessions/<id>/<ts>-<name>` timestamp prefix stripped) plus a hint of when
|
||||
attendees unlock it (slot date + end time).
|
||||
- **Open** — short-lived signed URL (600 s) in a new tab; previews inline for
|
||||
browser-renderable types (PDF).
|
||||
- **Download** — authenticated storage download saved as a blob under the
|
||||
clean filename.
|
||||
- **Delete** — confirm dialog, then the storage object is removed (errors
|
||||
surface rather than orphaning) and `material_path` is nulled.
|
||||
- **Upload / replace** — file input; on Save the new object uploads
|
||||
(`upsert`), `sessions.material_path` is updated (admins write `sessions`
|
||||
directly), the previous object is deleted, and a failed DB update rolls the
|
||||
fresh upload back. New sessions upload right after creation.
|
||||
|
||||
### Feedback AI Summaries
|
||||
|
||||
|
||||
Reference in new issue
Block a user