mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 01:40:01 +00:00
183fe0a93c
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
585 B
SQL
20 lines
585 B
SQL
-- Allow board members to READ bill approvals for their associations
|
|
CREATE POLICY "Board members can view bill_approvals"
|
|
ON public.bill_approvals
|
|
FOR SELECT
|
|
TO authenticated
|
|
USING (
|
|
association_id IN (SELECT public.get_user_association_ids())
|
|
);
|
|
|
|
-- Allow board members to UPDATE their own approval status (approve/deny)
|
|
CREATE POLICY "Board members can update bill_approvals"
|
|
ON public.bill_approvals
|
|
FOR UPDATE
|
|
TO authenticated
|
|
USING (
|
|
association_id IN (SELECT public.get_user_association_ids())
|
|
)
|
|
WITH CHECK (
|
|
association_id IN (SELECT public.get_user_association_ids())
|
|
); |