ixg_platform/apps
ixgadmin 8ad83a7a65 Restrict every data API to ops and admin
Batch writes were closed in 88eede5, but every other app's viewset still used
IsAuthenticated, which in this platform means any buyer. A buyer could rewrite a
document record, create a QC result (which moves the batch status and raises a
CAPA), and reach the write endpoints for CAPAs, certificates, ESG reports and
shipments.

- Use the one IsOpsOrAdmin from apps.compliance.permissions; drop the duplicate
  copy in apps/qc/views.py.
- Apply it to the whole viewset on shipments, qc, capa, esg, documents,
  certificates-of-analysis and regulatory-certs. The buyer portal is
  server-rendered through the ORM, so it needs none of these APIs.
- Keep the buyer chat working: AI interactions stay authenticated and scoped,
  and agent reads stay open while agent writes become ops/admin.
- Close a buyer-to-admin escalation in the users API: writes are admin-only and
  role/is_active are read-only, so a buyer can no longer PATCH their own row to
  role=admin and then pass every IsOpsOrAdmin check.
2026-09-17 15:53:44 +00:00
..
ai Restrict every data API to ops and admin 2026-09-17 15:53:44 +00:00
batches Restrict the processing-batch API to ops/admin 2026-09-17 14:48:09 +00:00
buyer Serve document and certificate files through a permission-checked download 2026-09-17 12:44:52 +00:00
capa Restrict every data API to ops and admin 2026-09-17 15:53:44 +00:00
compliance Enforce the intake allocation limit in the lineage API 2026-09-17 14:48:04 +00:00
core Harden the markup hygiene and seed idempotency tests 2026-09-17 14:48:16 +00:00
documents Restrict every data API to ops and admin 2026-09-17 15:53:44 +00:00
esg Restrict every data API to ops and admin 2026-09-17 15:53:44 +00:00
guides Help centre: portal-scoped guide audiences, and links that resolve 2026-09-16 16:39:07 +00:00
notifications Initial commit: IXG Platform 2026-07-29 16:48:48 +00:00
ops Pin the batch form wording to what the form actually does 2026-09-17 14:50:07 +00:00
qc Restrict every data API to ops and admin 2026-09-17 15:53:44 +00:00
shipments Restrict every data API to ops and admin 2026-09-17 15:53:44 +00:00
subscriptions Initial commit: IXG Platform 2026-07-29 16:48:48 +00:00
users Restrict every data API to ops and admin 2026-09-17 15:53:44 +00:00
__init__.py P99C: compliance automation - CoA auto-generation and EUDR due diligence 2026-08-05 13:58:39 +00:00