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,15 @@
|
||||
|
||||
-- Drop and recreate staff policy with WITH CHECK so updates work
|
||||
DROP POLICY IF EXISTS "Staff can manage elections" ON public.elections;
|
||||
CREATE POLICY "Staff can manage elections"
|
||||
ON public.elections
|
||||
FOR ALL
|
||||
TO authenticated
|
||||
USING (has_role(auth.uid(), 'admin'::app_role) OR has_role(auth.uid(), 'manager'::app_role) OR has_role(auth.uid(), 'employee'::app_role))
|
||||
WITH CHECK (has_role(auth.uid(), 'admin'::app_role) OR has_role(auth.uid(), 'manager'::app_role) OR has_role(auth.uid(), 'employee'::app_role));
|
||||
|
||||
-- Also allow anon to SELECT elections for public voting page
|
||||
CREATE POLICY "Anon can view elections"
|
||||
ON public.elections
|
||||
FOR SELECT TO anon
|
||||
USING (true);
|
||||
Reference in New Issue
Block a user