Admin password login + attendee profile self-service
- contacts.password: admin-only APPE Admin login password (event-independent); must match the bcrypt hash in auth.users.encrypted_password (set in Supabase). - APPE Admin login is now email + password (was QR token). - update_my_profile RPC (security definer, scoped to current_email()): attendees set their LinkedIn URL + show_email / show_linkedin toggles from the Profile. - Convivo Profile gains a 'Profile settings' card (LinkedIn + 2 toggles + Save). - Visibility enforced server-side in the public projection (linkedin nulled when show_linkedin off, email omitted when show_email off). - Seed: admin password appe-admin-2026; staff keep QR tokens as auth passwords. - Docs updated (schema, rpcs, seed, admin-app, screens, api-client, architecture, next-steps, README, docker-compose).
This commit is contained in:
1 parent
b52d8ab007
commit
8b1130f078
19 files changed
+290
-59
No files matched your search
+36
-3
@@ -4,10 +4,12 @@ What's done, what's next, and the open decisions. The full roadmap lives in the
|
||||
root [`roadmap.md`](../roadmap.md); this file is the working detail for the
|
||||
current phase.
|
||||
|
||||
> **Current state:** Phases 0–8 are complete and verified, plus a round of
|
||||
> **Fixes & Refinements** (QR token moved to the registration, role-pill
|
||||
> **Current state:** Phases 0–8 are complete and verified, plus two polish
|
||||
> rounds: **Fixes & Refinements** (QR token moved to the registration, role-pill
|
||||
> capitalization, connection detail sheet + red-dot recalc, admin schedule
|
||||
> speaker multi-select + upload/speaker bug fixes, sponsor contact search).
|
||||
> speaker multi-select + upload/speaker bug fixes, sponsor contact search) and
|
||||
> **Admin password + profile self-service** (admin logs in with email + password;
|
||||
> attendees set LinkedIn + visibility on their Profile).
|
||||
> Remaining work is cross-cutting (real event clock, deployment, testing) and
|
||||
> the open questions in [backend/interfaces.md](./backend/interfaces.md).
|
||||
|
||||
@@ -236,6 +238,37 @@ A cross-cutting polish round (migration `20260826000000_registration_qr_token.sq
|
||||
- **"My picks today"** — shows only **2 rows** (current + next slot's pick);
|
||||
"tap to change" is a **hyperlink** to the Agenda.
|
||||
|
||||
## Admin password + profile self-service — ✅ complete
|
||||
|
||||
Migration `20260827000000_admin_password_profile.sql` + app changes, all
|
||||
browser-verified.
|
||||
|
||||
**APPE Admin login = email + password (event-independent).**
|
||||
- `contacts.password` (admin-only) records the APPE Admin login password. To
|
||||
work it must match the bcrypt hash in `auth.users.encrypted_password` — set
|
||||
directly in Supabase (no self-service UI/procedure).
|
||||
- The admin app's Login screen is now **Email + Password** (was QR token).
|
||||
`AuthContext.signIn(email, password)` still calls `signInWithPassword` + the
|
||||
`is_admin` guard.
|
||||
- **Design decision:** Supabase Auth has one password per user. The dedicated
|
||||
admin uses a real password (works for any event). Staff (Bruno/Rita) keep
|
||||
their QR tokens as their Auth password — they can still log into the attendee
|
||||
app, and can also open the admin app with email + QR token.
|
||||
- Seed: the admin's password is `appe-admin-2026` (in both `contacts.password`
|
||||
and `auth.users.encrypted_password`); all other contacts have `password = NULL`.
|
||||
|
||||
**Convivo App — Profile self-service.**
|
||||
- New **Profile settings** card: a **LinkedIn** URL input + two **visibility
|
||||
toggles** ("Show my email" / "Show my LinkedIn") + **Save profile**.
|
||||
- Saving calls the new `update_my_profile(p_linkedin_url, p_show_email,
|
||||
p_show_linkedin)` RPC (security-definer, scoped to `current_email()`, limited
|
||||
to those 3 columns) — needed because the `contacts` UPDATE policy is
|
||||
admin-only, so an attendee can't update their own row via PostgREST.
|
||||
- Visibility is enforced **server-side**: the public projection
|
||||
(`lanyard_lookup` / `get_public_contacts`) nulls `linkedin_url` when
|
||||
`show_linkedin` is off and omits the email when `show_email` is off, so the
|
||||
toggles actually control what other attendees see.
|
||||
|
||||
## Cross-cutting / later
|
||||
|
||||
- **Real event clock** — replace the simulated `DEFAULT_NOW`
|
||||
|
||||
Reference in new issue
Block a user