fix: rls not allowing invite member

This commit is contained in:
Rotimi Best
2024-09-17 14:48:33 +01:00
parent 27f333fdcf
commit 8a7a9f8370
2 changed files with 22 additions and 13 deletions
@@ -1060,6 +1060,16 @@ to public
using (is_org_admin())
with check (is_org_admin());
create policy "Only user can update their account via email"
on "public"."organizationmember"
as PERMISSIVE
for UPDATE
to public
using (
(select auth.jwt()) ->> 'email' = email
with check (
(select auth.jwt()) ->> 'email' = email
);
create policy "Only auth users can read profile"
on "public"."profile"