Phase 12: share an event with co-hosts
The owner shares an event by email; a co-host gets full access inside it but can't delete it or change who it's shared with. Shares are keyed by email so an admin can be added before their first login, and RLS (not the UI) is what enforces the owner-only parts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+9
-1
@@ -81,5 +81,13 @@ show who was first within a second, and "Clear buzzers" resets both phones.
|
||||
**Done when:** team A buzzes then team B; "Wrong" hands the turn to B; "Got it" gives B one point
|
||||
in the scoring grid and on the scoreboard; "Undo" takes it back; "Next question" resets the phones.
|
||||
|
||||
## Phase 12 — Co-hosts
|
||||
- Apply `supabase/migrations/0005_cohosts.sql`, then `npm run gen:types` and `npm run check:rls`.
|
||||
- `event_cohosts` table; RLS widened from owner to owner-or-co-host, with delete and sharing owner-only.
|
||||
- "Co-hosts" section on the setup page (`addCohost` / `removeCohost` server actions); "Shared with you" in the events list.
|
||||
**Done when:** admin A shares an event with admin B's email; B sees it in their list, can edit it and
|
||||
run the control room alongside A, but has no Delete button and can't change the co-hosts; removing B
|
||||
makes the event disappear from B's list.
|
||||
|
||||
## Stretch (only if asked)
|
||||
Participants within teams · co-host admins · CSV export of results.
|
||||
Participants within teams · CSV export of results.
|
||||
|
||||
Reference in New Issue
Block a user