unbridled-41 opened a new pull request, #5993:
URL: https://github.com/apache/rocketmq-dashboard/pull/5993
### Which Issue(s) This PR Fixes
Fixes #5992
### Problem / Evidence
The dialog's options came from `users`, the paged and keyword-filtered
Users-tab state:
```tsx
options={users.map((u) => ({ value: u.username, label: u.username }))}
```
```
AclPage: offers users outside the loaded user page as rule principals
TestingLibraryElementError: Unable to find an element with the text:
directory-only-user
```
### Root cause / Fix
One state served two requirements (a paged table and a complete picker
source). Load the complete directory once per instance through the existing
unpaginated `listAclUsers` (refreshed after a user mutation), use it for the
picker and the admin badge, and keep the edited rule's principal selectable so
saving an unrelated change cannot invent one.
### Priority and scoring
**PRIORITY 72** - impact 28/40 (a core write path unusable beyond page 1 of
users), blast radius 14/20 (any deployment with more than 20 ACL users),
reproducibility 18/20 (pinned by the new test), maintenance value 12/20.
**FIX_CONFIDENCE 85**.
### Tests
`cd web && npx vitest run src/pages/instance/__tests__/AclPage.test.tsx` ->
`Tests 27 passed`; the new case fails before the change and passes after it;
the Tencent role case now stubs the directory for the same reason; `npx eslint`
and `npx tsc -b` pass.
### Risk
One additional request per instance (and after user mutations); the paged
table is unchanged.
--
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]