Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Remove default privileges from declarative grants schema

fzaninotto06d05fddc7b4
diff --git a/supabase/schemas/06_grants.sql b/supabase/schemas/06_grants.sql
index 865c9dbc..02945a58 100644
--- a/supabase/schemas/06_grants.sql
+++ b/supabase/schemas/06_grants.sql
@@ -160,18 +160,5 @@ grant all on sequence public.tasks_id_seq to anon;
grant all on sequence public.tasks_id_seq to authenticated;
grant all on sequence public.tasks_id_seq to service_role;
--- Default privileges
-alter default privileges for role postgres in schema public grant all on sequences to postgres;
-alter default privileges for role postgres in schema public grant all on sequences to anon;
-alter default privileges for role postgres in schema public grant all on sequences to authenticated;
-alter default privileges for role postgres in schema public grant all on sequences to service_role;
-
-alter default privileges for role postgres in schema public grant all on functions to postgres;
-alter default privileges for role postgres in schema public grant all on functions to anon;
-alter default privileges for role postgres in schema public grant all on functions to authenticated;
-alter default privileges for role postgres in schema public grant all on functions to service_role;
-
-alter default privileges for role postgres in schema public grant all on tables to postgres;
-alter default privileges for role postgres in schema public grant all on tables to anon;
-alter default privileges for role postgres in schema public grant all on tables to authenticated;
-alter default privileges for role postgres in schema public grant all on tables to service_role;
+-- No default privileges: every new table, view, sequence or function must
+-- declare its grants explicitly in the migration that creates it.