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>
17 lines
550 B
SQL
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)
|
|
);
|