refactor: update ADMIN_USER_CODES configuration; move to auth_api and clarify usage in documentation
Build and Push Docker Images / build-auth-api (push) Has been cancelled
Build and Push Docker Images / build-employee-api (push) Failing after 2m52s
Build and Push Docker Images / build-admin-ui (push) Failing after 24s
Build and Push Docker Images / build-transit-api (push) Failing after 26s
Build and Push Docker Images / build-error-log-api (push) Failing after 27s

This commit is contained in:
Sven laptop
2026-05-18 00:33:43 +02:00
parent 0e19aa0521
commit 9a56b40f50
4 changed files with 9 additions and 6 deletions
+5 -3
View File
@@ -370,10 +370,11 @@ Admin dashboard uses simple JWT-based authentication:
2. Receive JWT token from `auth_api`
3. Use token for admin operations (`/admin/*` endpoints)
Admin authorization is controlled by `ADMIN_USER_CODES` environment variable:
Admin authorization is controlled by `ADMIN_USER_CODES` environment variable configured in the `auth_api` service:
```bash
ADMIN_USER_CODES=42,101,205 # Comma-separated admin user codes
# Set admin user codes for the auth service (comma-separated)
ADMIN_USER_CODES=42,101,205
```
---
@@ -385,7 +386,8 @@ ADMIN_USER_CODES=42,101,205 # Comma-separated admin user codes
Use `DEV_MOCK=1` to work without a database (in-memory mock storage):
```bash
ADMIN_USER_CODES=42 DEV_MOCK=1 JWT_SECRET=devsecret npm --prefix ./transit_api start
# For local development set admin codes on the auth_api and start services
ADMIN_USER_CODES=42 DEV_MOCK=1 JWT_SECRET=devsecret npm --prefix ./auth_api start
```
### Production Mode