-- 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())
);