Supabase and Prisma RLS policies
Hello,
I'm trying to implement RLS using this guide https://github.com/prisma/prisma-client-extensions/tree/main/row-level-security.
All went good until I've added the Prisma extension to bypass the RLS.
This supabase policy is for when I want to check the current_user_id:
However, when I try to query the database using the bypass policy, which doesn't set the current_user_id, I get the following error:
I've tried casting using something like
I'm trying to implement RLS using this guide https://github.com/prisma/prisma-client-extensions/tree/main/row-level-security.
All went good until I've added the Prisma extension to bypass the RLS.
This supabase policy is for when I want to check the current_user_id:
(id = (current_setting('app.current_user_id'::text, true))::uuid).However, when I try to query the database using the bypass policy, which doesn't set the current_user_id, I get the following error:
I've tried casting using something like
CAST((COALESCE(myfield,'some-uu-id-her-e')) AS uuid) but that didn't work.