forked from fahrPool/fahrPool
10 lines
619 B
SQL
10 lines
619 B
SQL
-- Der Login-per-Benutzername-Lookup (web/app/login/actions.ts) fragt
|
|
-- profiles.username per Service-Role-Client VOR dem Login ab (RLS laesst
|
|
-- anonyme profiles-Lesezugriffe nicht zu, siehe 20260704095119_rls_profiles.sql).
|
|
-- service_role hat zwar BYPASSRLS, das umgeht aber nur Row-Level-Security --
|
|
-- die darunterliegende GRANT-Ebene prueft Postgres unabhaengig davon, genau
|
|
-- wie bei "authenticated" (siehe Kommentar in 20260704095119_rls_profiles.sql).
|
|
-- Ohne dieses GRANT bekommt service_role "permission denied for table
|
|
-- profiles", selbst mit BYPASSRLS.
|
|
grant select on public.profiles to service_role;
|