Unable to create a new record in a table if RLS is enabled
I'm using Supabase JS (version 2.50.2) and have a test policy for inserts (just one policy for the entire table) on the client table. However, on the below request, I get the following error
POST REQUEST
Payload
[
{
"name": "Prashant",
"website_url": "zeroic.in"
}
]
ERROR
{
"code": "42501",
"details": null,
"hint": null,
"message": "new row violates row-level security policy for table "client""
}
However, if RLS is disabled on this table, the insertion happens properly.
POST REQUEST
<base>v1/client?columns=%22name%22%2C%22website_url%22&select=*Payload
[
{
"name": "Prashant",
"website_url": "zeroic.in"
}
]
ERROR
{
"code": "42501",
"details": null,
"hint": null,
"message": "new row violates row-level security policy for table "client""
}
However, if RLS is disabled on this table, the insertion happens properly.
