-- ============================================
-- 此文件由 Meoo Cloud 自动生成，请勿修改
-- This file is auto-generated by Meoo Cloud, DO NOT MODIFY
-- ============================================

DROP POLICY IF EXISTS users_select_process_steps ON public.plan_process_steps; CREATE POLICY users_select_process_steps ON public.plan_process_steps FOR SELECT USING (EXISTS (SELECT 1 FROM public.production_plans p LEFT JOIN public.plan_factories pf ON p.id = pf.plan_id WHERE p.id = plan_id AND (p.purchaser_id = public.get_user_master_company_id() OR pf.factory_id = public.get_user_master_company_id())));
