Files
thrilltrack-explorer/supabase/migrations/20251003151137_23c72601-221b-44ed-bfdc-e28136ef802d.sql
gpt-engineer-app[bot] e15705e94d Fix RLS policy syntax
2025-10-03 15:11:51 +00:00

16 lines
505 B
SQL

-- Add RLS policies for locations table to allow moderators to INSERT and UPDATE
-- This is needed for location creation during park approval
-- Moderators can insert locations during submission approval
CREATE POLICY "Moderators can insert locations"
ON public.locations
FOR INSERT
TO authenticated
WITH CHECK (is_moderator(auth.uid()));
-- Moderators can update locations
CREATE POLICY "Moderators can update locations"
ON public.locations
FOR UPDATE
TO authenticated
USING (is_moderator(auth.uid()));