The GitHub Actions job "CI" on rocketmq-dashboard.git/fix/acl-principal-options 
has failed.
Run started by GitHub user unbridled-41 (triggered by unbridled-41).

Head commit for run:
a91365ee45191b960e03945560f50d490f5cf007 / unbridled-41 
<[email protected]>
fix(acl): let the rule dialog pick any principal, not only the loaded user page

The rule dialog's 主体 Select was fed by the same state as the paged Users tab:

    void pageAclUsers({ instanceId, page: userPage, pageSize: userPageSize, 
keyword: userKeyword })
      .then((result) => setUsers(result.items.map(normalizeUser)));
    ...
    options={users.map((u) => ({ value: u.username, label: u.username }))}

The field is required and has no free-text mode, so only the <=20 users of the 
current
page could be submitted - further narrowed by whatever the operator had typed 
into the
Users tab's search box (a keyword matching nothing left zero options). On a 
deployment
with more than one page of ACL users, a rule could not be created for any 
principal
outside that page at all.

The same page-scoped state also answered the admin badge, which is a 
result-set-wide
question (an admin on page 2 never got one).

Load the complete directory once per instance (and after a user mutation) 
through the
existing unpaginated `listAclUsers`, use it for the picker and for the badge, 
and keep
the edited rule's own principal selectable so saving an unrelated change cannot 
invent
one.

Tests (web/): npx vitest run src/pages/instance/__tests__/AclPage.test.tsx -> 
Tests 27
passed.
- new case "offers users outside the loaded user page as rule principals" fails 
before
  this change (the option is absent) and passes after it.
- the Tencent role case now stubs the directory for the same reason; the 
paged-table
  assertions are unchanged.
- npx eslint reports no errors; npx tsc -b passes.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/37994859008

With regards,
GitHub Actions via GitBox

Reply via email to