unbridled-41 commented on PR #4882:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/4882#issuecomment-5772229538

   **Verification pass (fresh checkout of `fix/acl-principal-full-directory` @ 
e126f598)**
   
   Code citations in the description were re-checked against the branch:
   
   - `acl.tsx` now loads `userDirectory` through `listAclUsers({ instanceId })` 
(aclService.ts:77-90 → `GET /acl/users`), and only `isAdmin` (acl.tsx:259-260 → 
rules-table badge, acl.tsx:591) and the rule-modal principal Select 
(acl.tsx:1468-1476) read from it. The Users tab keeps its server-paginated 
`pageAclUsers` state — the two sources no longer share state.
   - Backend contract: `AclController` exposes `GET /acl/users` 
(`AclService.listUsers`, unbounded) alongside `GET /acl/users/page` (pageSize ≤ 
100); mock mode (`isMockMode()`) serves the directory from the in-memory user 
list, so dev data flows through the same service call.
   - Directory-load failure degrades to an empty directory (`.catch(() => 
setUserDirectory([]))`) without a toast — deliberate, since the Users tab's own 
failure already surfaces the load error and the rule tab must stay usable.
   
   Tests re-executed from a clean checkout of this branch:
   
   - `npx vitest run src/pages/instance/__tests__/AclPage.test.tsx` → **Test 
Files 1 passed (1), Tests 25 passed (25)**.
   - Pre-fix failures (development run, component change stashed with the tests 
in place): `resolves the rule-tab admin badge from the full user directory` 
(badge absent because the loaded users page doesn't contain the admin 
principal) and `offers every directory user as a rule principal` 
(directory-only `remote-admin` not offered in the dropdown).
   - `npx tsc --noEmit` clean; `npx eslint src/pages/instance/acl.tsx 
src/pages/instance/__tests__/AclPage.test.tsx` clean.
   
   One correction was made to the description's Risk paragraph: it previously 
said the endpoint "is used elsewhere" in the web UI — in fact the page-level 
code had never consumed `listAclUsers` before (only the mock-mode internals of 
`pageAclUsers` call it). The body now states this is the endpoint's first 
page-level consumer.
   


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