mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 09:50:01 +00:00
Add ACMCC app source, Supabase backend, and project config
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- Replace the broken anon insert policy with one that validates via SECURITY DEFINER function (bypasses RLS on violations)
|
||||
DROP POLICY IF EXISTS "Anon can submit violation responses for valid violation" ON public.violation_responses;
|
||||
|
||||
CREATE POLICY "Anon can submit violation responses for valid violation"
|
||||
ON public.violation_responses
|
||||
FOR INSERT
|
||||
TO anon, authenticated
|
||||
WITH CHECK (
|
||||
EXISTS (
|
||||
SELECT 1 FROM public.lookup_violation_for_response(violation_id) lv
|
||||
WHERE lv.id = violation_id
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user