tju-yxq opened a new pull request, #5504:
URL: https://github.com/apache/rocketmq-dashboard/pull/5504
### Which Issue(s) This PR Fixes
- Fixes #5503
### Brief Description
Trims three ACL identity inputs at the form boundary, matching the page's
own convention (`handlePlainSubmit` already trims `accessKey`; `handleExamine`
trims `clusterId`):
- Rule `resource` is trimmed in `handleRuleSubmit` (the Tencent role mode's
`*` passes through unchanged); a padded LITERAL rule previously matched nothing.
- User `username` is trimmed in `handleUserSubmit`; a padded username
previously created a distinct identity that fragmented the rule principal
dropdown.
- Plain-access `secretKey` is trimmed in `handlePlainSubmit` (the same
treatment as the `accessKey` beside it); a padded secret previously broke
broker authentication invisibly.
### How Did You Test This Change?
```
cd web && npm test -- AclPage.test.tsx --run
Test Files 1 passed (1)
Tests 26 passed (26)
```
The existing suite covers the rule/user/plain-access create, edit and
validation flows; the trims are additive on the happy path.
```
cd web && npm run lint
✖ 10 problems (0 errors, 10 warnings) # the trunk baseline
```
```
cd web && npx tsc -b --force
(no output — exit 0)
```
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in (one
purpose — trim ACL identity inputs, per the grouping guideline #2107)
- [x] Commit subject follows Conventional Commits
- [x] Tests added or updated for non-trivial changes
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
(no new UI text)
- [x] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks) (no Java changes)
- [x] New source files carry the ASF license header (no new source files)
- [ ] Documentation touched where behaviour changed (normalization at the
form boundary)
--
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]