123123213weqw opened a new pull request, #4469: URL: https://github.com/apache/rocketmq-dashboard/pull/4469
### Which Issue(s) This PR Fixes - Fixes #4161 ### Brief Description Revoking the ACL rule for a Tencent role called `DeleteRole`, which removes the role account itself. On Tencent a role also owns the credentials, so deleting it silently removed the ACL user along with the rule, while the Studio page only asked to revoke access — the operator's next look at the user list showed the account gone. `deleteRule` now clears `PermRead`/`PermWrite` through `ModifyRole`, which keeps the account so the permissions can be re-enabled later, and documents why the role must stay. The rule listing also skips a role whose two permissions are both disabled: such a role has no effective ACL rule, so it should not be presented as one, but it is still reported as a user. This is revived from a branch whose pull request was closed when `rocketmq-studio` was folded into `master` and the base branch was deleted; the change is otherwise unchanged from that branch, and keeps its red/green pair. ### How Did You Test This Change? ``` cd server && mvn -B -ntp test -Dtest=TencentAclServiceTest [INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0 ``` Test coverage: `TencentAclServiceTest` asserts that deleting a rule issues `ModifyRole` with both permissions cleared rather than `DeleteRole`, and that a role with both permissions disabled is excluded from the rule listing while still appearing as a user. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits (`fix:`) - [x] Tests added or updated for non-trivial changes, test methods named `...Test` - [x] New UI text has both Chinese and English entries under `web/src/i18n/` — not applicable, no frontend change - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit checks) - [x] New source files carry the ASF license header — no new source files - [x] Documentation touched where behaviour changed — the method javadoc now records why the role is kept -- 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]
