Files
acmcc/supabase/migrations/20260319223309_8b60309d-ba6c-4ceb-9a6d-55e39748c77a.sql
T
2026-06-01 20:19:26 -04:00

17 lines
550 B
SQL

-- Update documents staff policy to include employee role
DROP POLICY IF EXISTS "Staff full access on documents" ON public.documents;
CREATE POLICY "Staff full access on documents"
ON public.documents 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)
);