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 index 993bd1f1..d5b5b203 100644 --- a/supabase/migrations/20241108005004_add_help_requests_policy_update_with_email.sql +++ b/supabase/migrations/20241108005004_add_help_requests_policy_update_with_email.sql @@ -1,6 +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())) -) \ No newline at end of file + ((auth.uid() IS NOT NULL) AND ((additional_info ->> 'email'::text) = auth.email())) +);