Add user authorization

This commit is contained in:
gabdevele
2026-06-02 20:01:56 +02:00 Unverified
parent 795383a98c
commit 54aa4cb73e
13 changed files with 361 additions and 36 deletions
+4
View File
@@ -11,6 +11,7 @@ Base path: `/api/v1`.
- `POST /auth/otp/request`: send an OTP email through MailHog.
- `POST /auth/otp/verify`: verify OTP and create an API token.
- `POST /auth/login/password`: password login fallback.
- `POST /auth/change-password`: change the authenticated user's password.
- `GET /me`: return the authenticated user.
Protected endpoints use:
@@ -35,3 +36,6 @@ Authorization: Bearer <token>
- `GET|POST /admin/areas`
- `GET|POST /admin/teams`
- `GET /admin/stats/overview`
- `GET /admin/users`
- `PATCH /admin/users/{id}/roles`
- `PATCH /admin/users/{id}/ban`
+3 -1
View File
@@ -11,6 +11,9 @@ assign and resolve interventions while preserving history and basic analytics.
reports and messages citizens.
- `admin`: manages users, roles, reference data, teams, areas and all reports.
The system admin seed must change password before using protected operational
or administrative APIs.
## Report Statuses
- `OPEN`: created and waiting for review.
- `UNDER_REVIEW`: an operator is checking the report.
@@ -33,4 +36,3 @@ assign and resolve interventions while preserving history and basic analytics.
- Route optimization.
- Public open data export.
- Full Docker packaging of the backend.