XnLemon opened a new pull request, #1087: URL: https://github.com/apache/dubbo-go-pixiu/pull/1087
## Summary Completes the login and account-management slice tracked by #1043. A fresh installation now creates `admin` / `pixiuadmin` only when that account is absent, while keeping an existing account's password and role intact. Registration remains available at `POST /register`, but requires both a valid JWT and administrator role; newly created accounts retain the existing administrator role. The Admin v2 account center shows the signed-in user's account details, supports password changes after checking the current password, and provides admin-only registration. Account identity is taken from validated JWT claims rather than a caller-supplied username header. The account-center layout now stacks the profile and registration cards in one column so the password form's height does not leave a large gap between them. Docker Compose waits for MySQL health before starting the backend's startup-time seed. ## Issue ledger - [x] Seed `admin` / `pixiuadmin` only when missing and preserve existing account credentials and role. - [x] Keep `/register`, require a valid JWT and admin role, validate inputs, and create admin accounts. - [x] Use validated JWT identity for account info, role/admin checks, and password changes. - [x] Add the account-center navigation, profile details, password form, and admin-only registration form. - [x] Document default credentials and the registration/password flow in API, Swagger, login, and web docs. - [x] Fix account-center column stacking and wait for MySQL health in Docker Compose. - [x] Add regression coverage for bootstrap credentials, registration authorization/validation, and unauthenticated route rejection. All items are implemented in this PR; no later stage remains. ## Compatibility and validation - The existing registration route and administrator role convention are retained; registration now requires authentication and administrator authorization. - Existing password hashing behavior is retained; this PR does not migrate stored hashes. - `go test ./admin/...` - `npm run build` in `admin/web` (passes; Vite reports a bundle-size warning for a chunk over 500 kB) - `docker compose config --quiet` - `git diff --check` Closes #1086 Part of #1043 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
