mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 09:50:01 +00:00
183fe0a93c
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
11 lines
494 B
SQL
11 lines
494 B
SQL
-- Allow authenticated users (homeowners, board members) to read status updates for their associations
|
|
CREATE POLICY "Authenticated users can read status updates for their associations"
|
|
ON public.status_updates
|
|
FOR SELECT
|
|
TO authenticated
|
|
USING (
|
|
association_id IN (SELECT public.get_user_association_ids())
|
|
OR public.has_role(auth.uid(), 'admin'::public.app_role)
|
|
OR public.has_role(auth.uid(), 'manager'::public.app_role)
|
|
OR public.has_role(auth.uid(), 'employee'::public.app_role)
|
|
); |