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).

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:
committed 2026-08-23 14:11:26 +02:00
1 parent 2f3952dc71
commit 0221b1a8c0
19 files changed
+290 -59

No files matched your search

+19 -16
View File
@@ -28,7 +28,7 @@ insert into auth.users (instance_id, id, aud, role, email, encrypted_password, e
('00000000-0000-0000-0000-000000000000', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-DIE-4458', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"Diego Ferreira"}', now(), now(), now(), now()),
('00000000-0000-0000-0000-000000000000', 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-MNA-2210', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"Marina Costa"}', now(), now(), now(), now()),
('00000000-0000-0000-0000-000000000000', 'cccccccc-cccc-cccc-cccc-cccccccccccc', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-LUC-9987', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"Lucas Oliveira"}', now(), now(), now(), now()),
('00000000-0000-0000-0000-000000000000', 'dddddddd-dddd-dddd-dddd-dddddddddddd', 'authenticated', 'authenticated', '[email protected]', crypt('CVV-ADM-0001', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"APPE Admin"}', now(), now(), now(), now())
('00000000-0000-0000-0000-000000000000', 'dddddddd-dddd-dddd-dddd-dddddddddddd', 'authenticated', 'authenticated', '[email protected]', crypt('appe-admin-2026', gen_salt('bf')), now(), '', '', '', '', '{"provider":"email","providers":["email"]}', '{"full_name":"APPE Admin"}', now(), now(), now(), now())
on conflict (id) do nothing;
insert into auth.identities (id, provider_id, identity_data, provider, user_id, created_at, updated_at, last_sign_in_at) values
@@ -53,21 +53,24 @@ on conflict (id) do nothing;
-- Dr. Elena Vasquez is an external keynote speaker (no registration / auth user).
-- NOTE: the QR token lives on the REGISTRATION (per event), not the contact.
-- -----------------------------------------------------------------------------
insert into public.contacts (email, full_name, linkedin_url, show_email, show_linkedin, is_admin) values
('[email protected]', 'Ana Silva', 'https://linkedin.com/in/anasilva', true, true, false),
('[email protected]', 'Bruno Costa', 'https://linkedin.com/in/brunocosta', false, true, true),
('[email protected]', 'Rita Lopes', null, false, false, true),
('[email protected]','Tomás Ribeiro', null, false, false, false),
('sofia.almeida@loop.com', 'Sofia Almeida', null, false, false, false),
('marco.chen@deepmind.com', 'Marco Chen', null, false, false, false),
('[email protected]', 'Julia Santos', null, false, false, false),
('pedro.nunes@microsoft.com', 'Pedro Nunes', null, false, false, false),
('carla.mendes@quintoessencial.com', 'Carla Mendes', null, false, false, false),
('diego.ferreira@stone.com', 'Diego Ferreira', null, false, false, false),
('[email protected]', 'Marina Costa', null, false, false, false),
('[email protected]', 'Lucas Oliveira', null, false, false, false),
('[email protected]', 'APPE Admin', null, false, false, true),
('[email protected]', 'Dr. Elena Vasquez', null, false, false, false)
-- `password` is the admin-only APPE Admin login password (event-independent).
-- Only the dedicated admin is seeded with one (demo value; override in Supabase).
-- Staff (Bruno/Rita) keep their QR token as the auth password for the attendee app.
insert into public.contacts (email, full_name, linkedin_url, show_email, show_linkedin, is_admin, password) values
('[email protected]', 'Ana Silva', 'https://linkedin.com/in/anasilva', true, true, false, null),
('bruno.costa@acme.com', 'Bruno Costa', 'https://linkedin.com/in/brunocosta', false, true, true, null),
('rita.lopes@globant.com', 'Rita Lopes', null, false, false, true, null),
('[email protected]','Tomás Ribeiro', null, false, false, false, null),
('sofia.almeida@loop.com', 'Sofia Almeida', null, false, false, false, null),
('marco.chen@deepmind.com', 'Marco Chen', null, false, false, false, null),
('julia.santos@ifood.com', 'Julia Santos', null, false, false, false, null),
('[email protected]', 'Pedro Nunes', null, false, false, false, null),
('[email protected]', 'Carla Mendes', null, false, false, false, null),
('[email protected]', 'Diego Ferreira', null, false, false, false, null),
('[email protected]', 'Marina Costa', null, false, false, false, null),
('[email protected]', 'Lucas Oliveira', null, false, false, false, null),
('[email protected]', 'APPE Admin', null, false, false, true, 'appe-admin-2026'),
('[email protected]', 'Dr. Elena Vasquez', null, false, false, false, null)
on conflict (email) do nothing;
-- -----------------------------------------------------------------------------