You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "nodece (via GitHub)" <gi...@apache.org> on 2023/04/11 16:28:50 UTC

[GitHub] [pulsar] nodece commented on a diff in pull request #20068: [fix][broker] Fix tenant admin authorization bug.

nodece commented on code in PR #20068:
URL: https://github.com/apache/pulsar/pull/20068#discussion_r1163067297


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java:
##########
@@ -84,7 +84,18 @@ public void initialize(ServiceConfiguration conf, PulsarResources pulsarResource
     @Override
     public CompletableFuture<Boolean> canProduceAsync(TopicName topicName, String role,
             AuthenticationDataSource authenticationData) {
-        return checkAuthorization(topicName, role, AuthAction.produce);
+        return validateTenantAdminAccess(topicName.getTenant(), role, authenticationData)

Review Comment:
   Could you move this logic to `org.apache.pulsar.broker.authorization.PulsarAuthorizationProvider#checkPermission`?



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org