equanz opened a new pull request #13723: URL: https://github.com/apache/pulsar/pull/13723
### Motivation Since https://github.com/apache/pulsar/pull/6428, we can define authz policy to each namespace operation. However, I think the operation policy `validateNamespacePolicyOperation(namespaceName, PolicyName.ANTI_AFFINITY, PolicyOperation.READ);` is not suitable for `getAntiAffinityNamespaces` method because this method is a tenant-wise operation. (is not specific a namespace-wise operation) ### Modifications * Add new tenant operation `LIST_ANTI_AFFINITY_NAMESPACES` * Modify operate validation to `LIST_ANTI_AFFINITY_NAMESPACES` If this approach is not accepted, we can use an existing operation like `CREATE_NAMESPACE` instead of adding a new tenant operation. ### Verifying this change - [ ] Make sure that the change passes the CI checks. This change is a trivial rework / code cleanup without any test coverage. ### Does this pull request potentially affect one of the following parts: *If `yes` was chosen, please highlight the changes* - Dependencies (does it add or upgrade a dependency): (no) - The public API: (no) - The schema: (no) - The default values of configurations: (no) - The wire protocol: (no) - The rest endpoints: (yes) - modified endpoint's validation - The admin cli options: (no) - Anything that affects deployment: (no) ### Documentation - [x] `no-need-doc` -- 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]
