yyqdbngt opened a new pull request, #2927: URL: https://github.com/apache/rocketmq-dashboard/pull/2927
## Summary - align `Acl2PolicyContext.validate()` with the operational `AclService#validateAcl2Policy` binding-type vocabulary - require a non-blank `boundType` and accept `TOPIC`, `GROUP`, `*`, `USER`, `SERVICE_ACCOUNT` case-insensitively - add regression coverage for the model validator's accepted and rejected binding types ## Why Two validators for the same ACL 2.0 policy concept disagreed: the model validator only accepted exactly-cased `USER`/`GROUP`/`SERVICE_ACCOUNT` and silently let a null `boundType` through, while the service validator (covered by `AclServiceTest`) requires a non-blank type and accepts the wider `TOPIC`/`GROUP`/`*`/`USER`/`SERVICE_ACCOUNT` set case-insensitively. A policy the service accepts (`"topic"`, `"user"`) failed the model's `validate()` with a misleading exception, and a null binding type passed the model but failed the service. ## Testing - `cd server && mvn -q -Dtest=Acl2PolicyContextTest test` — 11 tests pass (new class) - `cd server && mvn -q -Dtest=AclServiceTest test` — all tests pass (regression for the aligned vocabulary) -- 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]
