Files
thrilltrack-explorer/supabase/migrations/20251010230214_addcca80-9fb4-4f5a-b581-34463dec5c47.sql
2025-10-11 15:58:56 +00:00

10 lines
372 B
SQL

-- Drop existing policy that allows moderators
DROP POLICY IF EXISTS "Admins can do everything" ON public.blog_posts;
-- Create new policy for admins and superusers only
CREATE POLICY "Admins and superusers can manage blog posts"
ON public.blog_posts FOR ALL
USING (
has_role(auth.uid(), 'admin'::app_role) OR
has_role(auth.uid(), 'superuser'::app_role)
);