
DROP POLICY IF EXISTS "Anon can view elections" ON public.elections;

CREATE POLICY "Anon can view published elections"
ON public.elections FOR SELECT TO anon
USING (status IN ('open', 'closed'));
