diff --git a/supabase/migrations/20241108005004_add_help_requests_policy_update_with_email.sql b/supabase/migrations/20241108005004_add_help_requests_policy_update_with_email.sql new file mode 100644 index 00000000..28d38570 --- /dev/null +++ b/supabase/migrations/20241108005004_add_help_requests_policy_update_with_email.sql @@ -0,0 +1,8 @@ +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())) +with check ( + ((auth.uid() IS NOT NULL) AND ((additional_info ->> 'email'::text) = auth.email())) +); \ No newline at end of file