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>).
| Permission | Allows | Required by |
|---|---|---|
notifications.templates.read | Describe what this allows. | List the endpoints. |
notifications.templates.write | Describe what this allows. | List the endpoints. |
notifications.preferences.read | Describe what this allows. | List the endpoints. |
notifications.preferences.write | Describe what this allows. | List the endpoints. |
notifications.logs.read | Read 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.send | Describe what this allows. | List the endpoints. |
notifications.settings.read | Read 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.write | Change 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
- Add the relative name to
get_permissions()inbackend/app/modules/notifications/__init__.py(ormodule.py). - Add the namespaced form to the relevant role(s) in
backend/app/core/auth/permissions.py. - Add a row to the table above.
- Annotate the endpoint(s) with
Depends(require_permission(...)). - Update
frontend/app/config/permissions.tsif it gates UI.