From e5bc36d53ead8f3b60c45704d24712343a2ac449 Mon Sep 17 00:00:00 2001 From: Duy Do Date: Tue, 8 Oct 2024 21:44:10 +0700 Subject: [PATCH] Fix (#147) * Update policy * with check --- .../supabase/migrations/20241008143527_nodes_update_policy.sql | 1 + docker/supabase/migrations/20241008144128_with_check.sql | 1 + 2 files changed, 2 insertions(+) create mode 100644 docker/supabase/migrations/20241008143527_nodes_update_policy.sql create mode 100644 docker/supabase/migrations/20241008144128_with_check.sql diff --git a/docker/supabase/migrations/20241008143527_nodes_update_policy.sql b/docker/supabase/migrations/20241008143527_nodes_update_policy.sql new file mode 100644 index 00000000..fc21accd --- /dev/null +++ b/docker/supabase/migrations/20241008143527_nodes_update_policy.sql @@ -0,0 +1 @@ +ALTER POLICY "authenticated-update" ON nodes TO authenticated USING (auth.uid() = user_id); diff --git a/docker/supabase/migrations/20241008144128_with_check.sql b/docker/supabase/migrations/20241008144128_with_check.sql new file mode 100644 index 00000000..fadc97bc --- /dev/null +++ b/docker/supabase/migrations/20241008144128_with_check.sql @@ -0,0 +1 @@ +ALTER POLICY "authenticated-update" ON nodes TO authenticated USING (auth.uid() = user_id) WITH CHECK (true);