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
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user