Row-level security
# help-and-questions
s
How do I add an update policy for my app?
g
You can use the SQL editor or if just starting out use the Dashboard policy section under Authentication tab.
s
I'm not sure what I need to put in the sql editor
g
https://supabase.com/docs/guides/auth/row-level-security https://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().