Skip to content

Treatment Plan — permissions

Scaffolded stub — replace with proper documentation when this module is next touched.

Returned by TreatmentPlanModule.get_permissions() (relative names; the registry namespaces them as treatment_plan.<name>).

PermissionAllowsRequired by
treatment_plan.plans.readDescribe what this allows.List the endpoints.
treatment_plan.plans.writeDescribe what this allows.List the endpoints.
treatment_plan.plans.confirmDescribe what this allows.List the endpoints.
treatment_plan.plans.closeDescribe what this allows.List the endpoints.
treatment_plan.plans.reactivateDescribe what this allows.List the endpoints.

Role assignment

See backend/app/core/auth/permissions.py for the canonical role table.

Adding a new permission

  1. Add the relative name to get_permissions() in backend/app/modules/treatment_plan/__init__.py (or module.py).
  2. Add the namespaced form to the relevant role(s) in backend/app/core/auth/permissions.py.
  3. Add a row to the table above.
  4. Annotate the endpoint(s) with Depends(require_permission(...)).
  5. Update frontend/app/config/permissions.ts if it gates UI.