Skip to content

Commit

Permalink
Merge pull request #152 from pedrolivaresanchez/supabase/update-policy
Browse files Browse the repository at this point in the history
fix: update policy on auth user email only
  • Loading branch information
Pinx0 authored Nov 8, 2024
2 parents dd17a00 + ee39654 commit 8fd1680
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
create policy "Enable_update_for_users_based_on_email"
on public.help_requests
for update
to public
using (
((auth.uid() IS NOT NULL) AND ((additional_info ->> 'email'::text) = auth.email()))
);

alter policy "Enable_update_for_users_based_on_email"
on public.help_requests
to public
using (
((auth.uid() IS NOT NULL) AND ((additional_info ->> 'email'::text) = auth.email()))
);

0 comments on commit 8fd1680

Please sign in to comment.