Staff exclusions + contact-password auth sync
- contacts.password now auto-syncs to auth.users.encrypted_password via trg_contact_password_sync, so setting a password on the contact row in the Supabase UI makes it work with signInWithPassword immediately (fixes staff like Bruno not being able to log in with a UI-set password). One-time reconciliation in the migration. - Staff excluded from the leaderboard: _sync_leaderboard skips/removes staff rows, get_leaderboard() filters type='staff', seed no longer inserts staff. Affects the attendee Leaderboard and the admin Dashboard 'Top points'. - Home/Agenda/Profile identical for all roles: Home quick-action always 'Scan & connect' (no 'Check-in' relabel), footer role badge removed, tab label always 'Scan' (staff keep check-in via the Scan screen mode toggle). - Profile: removed the duplicate Staff pill (type pill already shows Staff). - Agenda session sheet: 'Download material' moved to the bottom of the button stack with spacing. - Docs updated (schema, rpcs, seed, screens, architecture, next-steps).
This commit is contained in:
1 parent
8b1130f078
commit
698bf13551
12 files changed
+203
-45
No files matched your search
@@ -130,11 +130,13 @@ the work atomically, and the `leaderboard` table change fans out over Realtime.
|
||||
- **Attendees & staff:** the **QR token is the Supabase Auth password**; the
|
||||
**email is the identifier**. Login is a standard
|
||||
`signInWithPassword({ email, password: qrToken })`.
|
||||
- **APPE Admin:** logs in with **email + a real password** (event-independent, so
|
||||
it works for any event). The password is recorded in `contacts.password` and
|
||||
must match the bcrypt hash in `auth.users.encrypted_password`. It is set
|
||||
directly in Supabase (no self-service UI). Staff can also open the admin app
|
||||
with their email + QR token, since that is their Auth password.
|
||||
- **APPE Admin / staff:** can log in with **email + a real password**
|
||||
(event-independent, so it works for any event). The password is recorded in
|
||||
`contacts.password`; a trigger (`trg_contact_password_sync`) **auto-syncs** it
|
||||
as the bcrypt hash in `auth.users.encrypted_password`, so setting it in the
|
||||
Supabase Table Editor makes it work with `signInWithPassword` immediately.
|
||||
Staff can also still log in with their email + QR token (their seeded Auth
|
||||
password).
|
||||
- `enable_confirmations = false`, so **no email is sent** — the email is only a
|
||||
"confirm it's you" check against the ticket purchase.
|
||||
- After login, the app holds a **session JWT** (in `localStorage`) that lasts
|
||||
|
||||
Reference in new issue
Block a user