Replies: 3 comments 1 reply
-
It is not possible with RLS. You can't see the filter values. |
Beta Was this translation helpful? Give feedback.
-
Hello, I am making a filter to find a record ( imei = 830675132116850), this filter as a GET method returns the entire table, what am I doing wrong. let { data: validacion_imei, error } = await supabase |
Beta Was this translation helpful? Give feedback.
-
In case anyone else ends up here — I followed @GaryAustin1's suggestion and created a RLS policy with a definer function, and that works like a charm. In my case, I have a table called I created the function like so:
And the policy: CREATE POLICY "Allow reading own challenges"
ON "authentication"."challenge"
AS PERMISSIVE
FOR SELECT
TO public
USING (
validate_challenge(challenge::varchar)
); Maybe that helps someone! |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm facing an easy problem with RLS.
I would like to create a policy which allow SELECT only for rows that matches the value passed from the request (for anon key).
For example I have this table called
test_table
:I would like to enable queries like this:
supabase.from("test_table").select("*").eq("test_id", "hello")
but disallow
supabase.from("test_table").select("*")
in way that anon keys can not get all the table but only rows that match the specified test_id column.
Is this possibile?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions