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. 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
7776145a77
commit
a8f3f5b8e1
13 files changed
+334
-30
No files matched your search
@@ -8,7 +8,7 @@ import {
|
||||
getSessions,
|
||||
getSlots,
|
||||
removeSessionMaterial,
|
||||
sessionMaterialUrl,
|
||||
openSessionMaterial,
|
||||
setSessionSpeakers,
|
||||
uploadSessionMaterial,
|
||||
} from '../lib/api';
|
||||
@@ -573,9 +573,19 @@ function SessionModal({
|
||||
<label>Material</label>
|
||||
{session.material_path ? (
|
||||
<div className="row" style={{ gap: 10 }}>
|
||||
<a className="btn small" href={sessionMaterialUrl(session.material_path)} target="_blank" rel="noreferrer">
|
||||
<button
|
||||
className="btn small"
|
||||
disabled={busy}
|
||||
onClick={async () => {
|
||||
try {
|
||||
await openSessionMaterial(session.material_path!);
|
||||
} catch (e) {
|
||||
onSaved(e instanceof Error ? e.message : 'Could not open material');
|
||||
}
|
||||
}}
|
||||
>
|
||||
📎 View current
|
||||
</a>
|
||||
</button>
|
||||
<button
|
||||
className="btn small danger"
|
||||
disabled={busy}
|
||||
|
||||
Reference in new issue
Block a user