feat: add magic-link admin login and speaker materials portal
This commit is contained in:
1 parent
3adc0fd58f
commit
8d8d3ae4b8
28 files changed
+1623
-232
No files matched your search
@@ -42,6 +42,52 @@ docker exec -i supabase_db_Convivo psql -U postgres < supabase/tests/rpc_tests.s
|
||||
| Speaker auto-promote trigger | attendee → speaker, never overrides staff |
|
||||
| Leaderboard | excludes staff |
|
||||
|
||||
## Speaker Portal
|
||||
|
||||
[speaker_portal_tests.sql](../../supabase/tests/speaker_portal_tests.sql) is an
|
||||
independent fail-fast suite (`ON_ERROR_STOP`) with generated contacts/events/talks,
|
||||
temporary snapshots and a single transaction ending in `ROLLBACK`. It needs the
|
||||
[speaker portal migration](../../supabase/migrations/20261006175631_speaker_portal.sql)
|
||||
and [staff overlap migration](../../supabase/migrations/20261007153957_speaker_portal_staff_overlap.sql)
|
||||
on the **local** database. Apply without resetting existing data:
|
||||
|
||||
```bash
|
||||
docker exec -i supabase_db_Convivo psql -U postgres -d postgres -v ON_ERROR_STOP=1 --single-transaction < supabase/migrations/20261006175631_speaker_portal.sql
|
||||
docker exec -i supabase_db_Convivo psql -U postgres -d postgres -v ON_ERROR_STOP=1 --single-transaction < supabase/migrations/20261007153957_speaker_portal_staff_overlap.sql
|
||||
docker exec -i supabase_db_Convivo psql -U postgres -d postgres -v ON_ERROR_STOP=1 < supabase/tests/speaker_portal_tests.sql
|
||||
```
|
||||
|
||||
This direct migration application reloads the local API schema but does not
|
||||
write CLI migration history. It is not a production deployment command. No
|
||||
database reset is needed; fixture sequence state is not advanced.
|
||||
|
||||
The suite checks assigned speaker, non-admin staff and Admin staff access,
|
||||
unassigned staff, mismatched same-event registrations, attendee assignments,
|
||||
unregistered assignments, automatic service-session exclusion, active/inactive past/future
|
||||
events, malformed and cross-session paths, required uploaded objects, Storage
|
||||
INSERT/UPDATE/DELETE (including UPDATE WITH CHECK) and unchanged registration,
|
||||
points-log, check-in and leaderboard state. Storage policy checks use the
|
||||
`authenticated` database role, not a superuser that bypasses RLS. A failed
|
||||
assertion exits non-zero and connection closure rolls back the transaction.
|
||||
|
||||
[speaker-portal.spec.ts](../../e2e/tests/speaker-portal.spec.ts) uses mocked Auth,
|
||||
REST and Storage responses, without real credentials or mail delivery:
|
||||
|
||||
```bash
|
||||
cd e2e
|
||||
CONVIVO_BASE_URL=http://127.0.0.1:3000 npx playwright test tests/speaker-portal.spec.ts --project=chromium --reporter=list --output=/tmp/convivo-speaker-results
|
||||
```
|
||||
|
||||
Start Convivo's dev server first. Coverage includes both routes, existing-users-only
|
||||
link requests, URL scrubbing, callback errors/rejections, StrictMode single-use
|
||||
implicit/PKCE callbacks, local logout, empty access, upload/replace/remove across
|
||||
desktop/mobile, failed attachment cleanup and the normal app's check-in gate
|
||||
after portal login. Mocked tests do not validate live mail delivery, deployment
|
||||
redirect allowlists or real Storage behavior; the SQL suite validates database
|
||||
authorization separately. See [screen contract](../frontend/screens.md#speaker-portal),
|
||||
[API client](../frontend/api-client.md#speaker-portal), [RLS](./rls.md#speaker-portal-authorization)
|
||||
and [RPCs](./rpcs.md#speaker-portal-rpcs).
|
||||
|
||||
## Files
|
||||
|
||||
- [`supabase/tests/rpc_tests.sql`](../../supabase/tests/rpc_tests.sql) — the test
|
||||
|
||||
Reference in new issue
Block a user