Row level security #2377
-
|
I'm trying to insert a new user in my frontend but the row-level security denies it Any help on this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @link-discord! Do you have security policy for select? If not, your case might be related to this issue supabase/postgrest-js#127 In short, by default when you insert data into Supabase, you are not only inserting, but selecting the data that you inserted, thus you need both insert and select rights for the inserted data. To fix this, you can either create security policy for select as well, or use await supabase.from('sample').insert({ key: 'value' }, { returning: 'minimal' }) |
Beta Was this translation helpful? Give feedback.




Hi @link-discord!
Do you have security policy for select? If not, your case might be related to this issue supabase/postgrest-js#127
In short, by default when you insert data into Supabase, you are not only inserting, but selecting the data that you inserted, thus you need both insert and select rights for the inserted data. To fix this, you can either create security policy for select as well, or use
returning: 'minimal'option like this: