unbridled-41 opened a new issue, #4887: URL: https://github.com/apache/rocketmq-dashboard/issues/4887
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) and found no similar issue. ### Studio Version - branch: `rocketmq-studio` (dev trunk), base commit `4c697f07` - The defect exists in the current code: `web/src/pages/instance/acl.tsx` — `isAdmin` (~line 259), the rules-table admin badge (~line 591) and the rule-modal principal `Select` (~line 1468) all read the `users` state. ### Describe the Bug The ACL rule tab derives both the "管理员 / Admin" badge (`isAdmin`) and the principal dropdown of the Add/Edit Rule modal from `users` — the server-paginated, keyword-filterable state of the **Users tab** (default 20 rows, max 100 via `pageAclUsers`). With more than one page of ACL users: 1. A rule whose principal is an admin loses its badge whenever that user's row is not on the currently loaded users page (or when a user-tab keyword filter narrows it). 2. The principal `Select` has `showSearch` over `users`-derived options only and no free input, so a rule **cannot be created or edited for any user outside the currently loaded users page** — a functional blocker on instances with many users. ### Steps to Reproduce 1. On an instance with more than 20 ACL users (or with a keyword filter active on the Users tab), open the ACL page, Rules tab. 2. Observe a rule whose principal is an admin user listed beyond the loaded users page: no 管理员 badge renders. 3. Click 添加规则 and open the 主体 dropdown: users beyond the loaded page are not offered, and no free-form principal can be entered, so no rule can be created for them. The two behaviors are pinned by the regression tests added in #4882 (`resolves the rule-tab admin badge from the full user directory...` and `offers every directory user as a rule principal...`), which fail before the fix when the Users-tab page mock excludes the relevant users. ### What Did You Expect to See? The admin badge resolves against the full ACL user directory regardless of Users-tab pagination/filtering, and the principal dropdown offers every directory user. ### What Did You See Instead? Badges depend on which users page happens to be loaded, and principals beyond that page cannot be targeted by any rule. ### Additional Context The backend already exposes the unbounded directory at `GET /acl/users` (`AclService.listUsers`), alongside the paged `GET /acl/users/page`. Fixed by #4882, which loads the directory into a separate `userDirectory` state for the badge and the dropdown while the Users tab keeps its paginated state. -- 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]
