4 ms·
Admit, I am partially wrong. I was working with supabase and in there you can't set a role for the user, it's always `authenticated`. I was looking for someth
by CafeRacer 2y ago
Admit, I am partially wrong.
I was working with supabase and in there you can't set a role for the user, it's always `authenticated`.
I was looking for something more like
```
create policy "No payment_total for user"
on todos for select (payment_total, invoice_number, payment_hash)
using (
-- Dynamic code example
(select auth.uid()) = user_id AND get_user_role(auth.uid()) != 'admin'
);
```
- o1o1o1 2y agoOk, this is not provided in the UI but why don't you use something like this? - https://github.com/point-source/supabase-tenant-rbac https://github.com/point-source/supabase-tenant-rbac - https://github.com/vvalchev/supabase-multitenancy-rbac https://github.com/vvalchev/supabase-multitenancy-rbac