Frun1na opened a new pull request, #4729:
URL: https://github.com/apache/rocketmq-dashboard/pull/4729

   ### Which Issue(s) This PR Fixes
   
   ### Brief Description
   
   `README_zh.md` still claimed the login endpoint only accepts the users 
configured through
   `STUDIO_AUTH_ADMIN_USERNAME` / `STUDIO_AUTH_ADMIN_PASSWORD`. Since #2313 
added the persisted user
   table, those credentials are only a bootstrap seed:
   
   - `AuthService.ensureBootstrapUsers()` runs on login and creates the 
configured users only when
     `rmq_studio_user` is empty; afterwards the database is the source of truth.
   - Accounts created later on the user-management page log in too, so 
"仅接受已配置用户" is wrong in
     the other direction as well.
   - README.md already describes the seed-then-database model; the doc template 
also asks to keep the
     two READMEs in sync.
   
   This brings the Chinese paragraph in line with the English one and with the 
code. No behaviour
   changed.
   
   ### How Did You Test This Change?
   
   Documentation only, so the Maven and Vitest suites were not re-run. The 
rewritten claims were
   verified against the implementation:
   
   ```
   $ grep -n -A6 "private void ensureBootstrapUsers" .../auth/AuthService.java
       private void ensureBootstrapUsers() {
           if (userMapper.selectCount(null) > 0) {
               return;                                  // seed only against an 
empty table
           }
           if (authProperties.configuredUsers().isEmpty()) {
               throw new BusinessException(503, "No Studio users are 
configured");
           }
           ...
   
   $ grep -n -B1 -A3 "loginDatabaseUser(LoginDTO" .../auth/AuthService.java
       private LoginVO loginDatabaseUser(LoginDTO request) {
           ensureBootstrapUsers();                      // seeding happens on 
login, not at startup
   
   $ cat .../auth/AuthService.java | sed -n '61,66p'
    * <p>The configuration users remain a bootstrap mechanism for a fresh 
database only. Once a
    * Studio user has been created, the database is the source of truth for 
credentials and account
    * status.</p>
   ```
   
   The user-management capabilities (create users, enable/disable, reset 
passwords) and the
   `HttpOnly` cookie / explicit bearer-token exchange are the same statements 
the English README
   already makes.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`docs:`)
   - [ ] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [ ] New UI text has both Chinese and English entries under `web/src/i18n/`
   - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks)
   - [ ] New source files carry the ASF license header
   - [x] Documentation touched where behaviour changed (README / `docs/` / 
in-app help)
   


-- 
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]

Reply via email to