Add ACMCC app source, Supabase backend, and project config

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 20:19:26 -04:00
parent 313b51b412
commit 183fe0a93c
1422 changed files with 259271 additions and 0 deletions
@@ -0,0 +1,20 @@
-- Fix anon SELECT: restrict to rows matching a vote_token or access_code filter
DROP POLICY IF EXISTS "Anon can select own voter record by token" ON public.election_eligible_voters;
CREATE POLICY "Anon can select own voter record by token" ON public.election_eligible_voters
FOR SELECT TO anon
USING (
vote_token::text = current_setting('request.headers', true)::json->>'x-vote-token'
OR access_code = current_setting('request.headers', true)::json->>'x-access-code'
);
-- Fix anon UPDATE: restrict to rows matching vote_token filter
DROP POLICY IF EXISTS "Anon can update voted status by token" ON public.election_eligible_voters;
CREATE POLICY "Anon can update voted status by token" ON public.election_eligible_voters
FOR UPDATE TO anon
USING (
vote_token::text = current_setting('request.headers', true)::json->>'x-vote-token'
)
WITH CHECK (
vote_token::text = current_setting('request.headers', true)::json->>'x-vote-token'
);