Skip to content

Notifications — permissions

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

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

PermissionAllowsRequired by
notifications.templates.readDescribe what this allows.List the endpoints.
notifications.templates.writeDescribe what this allows.List the endpoints.
notifications.preferences.readDescribe what this allows.List the endpoints.
notifications.preferences.writeDescribe what this allows.List the endpoints.
notifications.logs.readRead message logs, a patient's conversation thread, and which channels are configured for the clinic.GET /notifications/conversations/{patient_id}, GET /notifications/channels (#207), plus the log-listing endpoints.
notifications.sendDescribe what this allows.List the endpoints.
notifications.settings.readRead clinic notification settings, incl. preferred_channel / manual_channels / computed available_channels — every manual-send surface needs it to render its channel buttons (#287), so all staff roles except hygienist hold it.GET /api/v1/notifications/settings
notifications.settings.writeChange clinic notification settings (per-type toggles + channel configuration). Admin only.PUT /api/v1/notifications/settings

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/notifications/__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.