Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

456 B
Raw Blame
ALTER POLICY "Users can view other users from their same company" ON "user" USING (
  "id" IN (
    SELECT "userId" 
    FROM "userToCompany" 
    WHERE "companyId" = ANY (
      (
        SELECT get_companies_with_employee_role()
      )::text[]
    )
  )
);

ALTER POLICY "Authenticated users can view userToCompany" ON "userToCompany"
  USING (
    "companyId" = ANY (
      (
        SELECT get_companies_with_employee_role()
      )::text[]
    )
  );