RLS check current user has a role, if so delete
I have a table where each user has a role that's either admin or default.
I want to allow only those who have role = admin to delete rows from this table. Right now it's very counter-intuitive when I try to make a policy as seen in screenshot. What am I missing? With current policy I can only delete users that have role = admin and those with role default are rejected.
I want only those signed in users who have role=admin be able to delete users
I want to allow only those who have role = admin to delete rows from this table. Right now it's very counter-intuitive when I try to make a policy as seen in screenshot. What am I missing? With current policy I can only delete users that have role = admin and those with role default are rejected.
I want only those signed in users who have role=admin be able to delete users

