-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Supabase RLS Policies #11816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please add a reproduction in order for us to be able to investigate. Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided. Why was this issue marked with the
|
Bumping this issue. I would love to see the Postgres Docs page get a section covering proper RLS policies. |
We are also looking for more guidance around Supabse RLS + Payload |
I was able to enable RLS on all Payload-managed tables by adding an export default buildConfig({
// ...
db: postgresAdapter({
pool: {
connectionString: '(supabase db uri)',
},
afterSchemaInit: [
({ schema }) => {
// Enable RLS for all tables
Object.values(schema.tables).forEach((table) => table.enableRLS());
return schema;
},
],
}),
// ...
}); I'm not interested in implementing policies at this point so this is sufficient for me, just thought I'd share in case anyone else finds it useful as a starting point for the original issue. |
Describe the Bug
Hey guys, absolutely love payloadcms but I have a tiny concern when using supabase with it.
Basically the tables inserted by payload when you seed the project (website template) all do not have RLS policies in supabase. How should I approach adding these policies?
Link to the code that reproduces this issue
/
Reproduction Steps
seed the website template with supabase and check the supabase dashboard
Which area(s) are affected? (Select all that apply)
db-postgres
Environment Info
The text was updated successfully, but these errors were encountered: