You can use the SQL editor or if just starting out use the Dashboard policy section under Authentication tab.
s
seeinplays
05/27/2023, 12:39 AM
I'm not sure what I need to put in the sql editor
g
garyaustin
05/27/2023, 12:43 AM
https://supabase.com/docs/guides/auth/row-level-securityhttps://supabase.com/docs/learn/auth-deep-dive/auth-row-level-security
The policy UI is a good place to start as it gives a few examples.
For update to work you need an update and a select policy.
No one can answer what you need for that policy as we don't know what you want to allow or protect from.
A basic policy in the editor can be role = authenticated with a policy of true to allow signed in users to update any row. If you want to restrict to just the "owner" of the row then you have to have a user_id column and use user_id = auth.uid().