89799969 opened a new pull request, #4321:
URL: https://github.com/apache/rocketmq-dashboard/pull/4321
Fixes #4161
## Problem
Studio maps each Tencent Cloud RocketMQ role to both an ACL **user**
(credentials) and a cluster-wide ACL **rule** (PermRead/PermWrite). The two
resources have separate delete actions, but `TencentAclService.deleteRule`
called Tencent Cloud `DeleteRole`, exactly like user deletion.
Deleting a rule therefore permanently removed the role account and its
access credentials.
## Fix
- `deleteRule` now calls `ModifyRole` with `PermRead=false` and
`PermWrite=false`, which revokes the rule while keeping the role account.
- Roles with both permissions disabled are excluded from `listRules` (no
effective rule) but remain visible in the ACL user list so operators can
re-enable them.
- Explicit ACL user deletion still uses `DeleteRole`.
## Testing
- `TencentAclServiceTest` (14 tests, including 2 new cases):
- `deleteRuleRevokesPermissionsWithoutDeletingTheRoleTest`
- `listRulesHidesPermissionlessRolesThatStillExistAsUsersTest`
```
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0
```
Local run: Temurin 21.0.12.1, `mvn -Dtest=TencentAclServiceTest test`
--
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]