Jenaro Calvino
06/06/2022, 7:24 PMNeedle
06/06/2022, 7:24 PMNeedle
06/06/2022, 8:28 PMOlyno
06/07/2022, 8:53 AMJenaro Calvino
06/08/2022, 1:58 PMOlyno
06/08/2022, 2:32 PMJenaro Calvino
06/08/2022, 2:32 PMOlyno
06/08/2022, 2:34 PMgaryaustin
06/08/2022, 2:39 PMgrant usage on schema public to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on tables to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on functions to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on sequences to postgres, anon, authenticated, service_role;
from that issue... https://github.com/supabase/supabase/blob/d1d6278913f5a752253a3d47a0d4adabd3bfaf7a/docker/volumes/db/init/00-initial-schema.sql#L37-L43
For the client to work anon, authenticated, service role need access to all public tables.
But you may be better off just starting over as you may have long term issues if you can't patch them all back up.Olyno
06/08/2022, 2:49 PMgaryaustin
06/08/2022, 2:54 PMJenaro Calvino
06/08/2022, 2:54 PMJenaro Calvino
06/08/2022, 2:54 PMgaryaustin
06/08/2022, 2:56 PMJenaro Calvino
06/08/2022, 2:56 PMgaryaustin
06/08/2022, 2:58 PMJenaro Calvino
06/08/2022, 2:58 PMJenaro Calvino
06/08/2022, 2:59 PMJenaro Calvino
06/08/2022, 3:00 PMgaryaustin
06/08/2022, 3:00 PMJenaro Calvino
06/08/2022, 3:32 PMgaryaustin
06/08/2022, 3:37 PMgrant delete, insert, references, select, trigger, truncate, update on messages to anon;
grant delete, insert, references, select, trigger, truncate, update on messages to authenticated;
grant delete, insert, references, select, trigger, truncate, update on messages to service_role;
Are the grants on my public tables.Jenaro Calvino
06/08/2022, 6:35 PMJenaro Calvino
06/08/2022, 6:36 PMselect *
from information_schema.table_privileges
where table_name = 'User'
garyaustin
06/08/2022, 6:51 PMJenaro Calvino
06/08/2022, 7:16 PMlet { data, error, status } = await supabase
.from("User")
.select(`*`)
.eq("id", user.id)
.single();
Jenaro Calvino
06/08/2022, 7:18 PMJenaro Calvino
06/08/2022, 7:20 PMgaryaustin
06/08/2022, 7:22 PMgaryaustin
06/08/2022, 7:24 PMJenaro Calvino
06/08/2022, 7:26 PMgaryaustin
06/08/2022, 7:27 PMJenaro Calvino
06/08/2022, 7:27 PMJenaro Calvino
06/08/2022, 7:28 PMgaryaustin
06/08/2022, 7:29 PMJenaro Calvino
06/08/2022, 7:37 PMJenaro Calvino
06/08/2022, 7:37 PMObject {
"code": "42501",
"details": null,
"hint": null,
"message": "permission denied for table User",
}
garyaustin
06/08/2022, 7:43 PMJenaro Calvino
06/08/2022, 7:45 PMJenaro Calvino
06/08/2022, 7:45 PMgaryaustin
06/08/2022, 7:48 PMJenaro Calvino
06/08/2022, 7:48 PMgaryaustin
06/08/2022, 7:48 PMgaryaustin
06/08/2022, 7:50 PMJenaro Calvino
06/08/2022, 7:53 PMJenaro Calvino
06/08/2022, 7:54 PMgaryaustin
06/08/2022, 7:55 PMJenaro Calvino
06/08/2022, 7:56 PMgaryaustin
06/08/2022, 7:57 PMgaryaustin
06/08/2022, 7:57 PMJenaro Calvino
06/08/2022, 7:58 PMJenaro Calvino
06/08/2022, 8:01 PMgaryaustin
06/08/2022, 8:01 PMgaryaustin
06/08/2022, 8:02 PMJenaro Calvino
06/08/2022, 8:02 PMgaryaustin
06/08/2022, 8:03 PM