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..d5b5b203 --- /dev/null +++ b/supabase/migrations/20241108005004_add_help_requests_policy_update_with_email.sql @@ -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())) +);