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,39 @@
|
||||
|
||||
-- Allow board members to read financial data for associations they serve on the board for.
|
||||
-- This powers the board "Financial Overview" page.
|
||||
|
||||
CREATE POLICY "Board members can view association bank accounts"
|
||||
ON public.bank_accounts FOR SELECT
|
||||
TO authenticated
|
||||
USING (
|
||||
association_id IN (
|
||||
SELECT bm.association_id FROM public.board_members bm WHERE bm.user_id = auth.uid()
|
||||
)
|
||||
);
|
||||
|
||||
CREATE POLICY "Board members can view association bank transactions"
|
||||
ON public.bank_transactions FOR SELECT
|
||||
TO authenticated
|
||||
USING (
|
||||
association_id IN (
|
||||
SELECT bm.association_id FROM public.board_members bm WHERE bm.user_id = auth.uid()
|
||||
)
|
||||
);
|
||||
|
||||
CREATE POLICY "Board members can view association collections"
|
||||
ON public.collections FOR SELECT
|
||||
TO authenticated
|
||||
USING (
|
||||
association_id IN (
|
||||
SELECT bm.association_id FROM public.board_members bm WHERE bm.user_id = auth.uid()
|
||||
)
|
||||
);
|
||||
|
||||
CREATE POLICY "Board members can view association owner ledger entries"
|
||||
ON public.owner_ledger_entries FOR SELECT
|
||||
TO authenticated
|
||||
USING (
|
||||
association_id IN (
|
||||
SELECT bm.association_id FROM public.board_members bm WHERE bm.user_id = auth.uid()
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user