A full-featured CRM built with React, shadcn/ui, and Supabase.
Remove sales update RLS policy
React-Admin CI4a1570945c07
diff --git a/supabase/migrations/20241104153231_sales_policies.sql b/supabase/migrations/20241104153231_sales_policies.sqlindex e006e821..161925e2 100644--- a/supabase/migrations/20241104153231_sales_policies.sql+++ b/supabase/migrations/20241104153231_sales_policies.sql@@ -35,16 +35,3 @@ as permissivefor insertto authenticatedwith check (private.is_admin());---create policy "Enable update for authenticated users only"-on "public"."sales"-as permissive-for update-to authenticated--- Users can only update their own records, unless they are administrators--- This is the *Can I see the current record?* check-using (((( SELECT auth.uid() AS uid) = user_id) OR private.is_admin()))--- Users can only update their own records and only if they don't change their administrator column, unless they are administrators--- This is the *Can I set those new values?* check-with check ((((( SELECT auth.uid() AS uid) = user_id) AND (administrator = false)) OR private.is_admin()));