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/05/12 08:38:45 UTC

[GitHub] [pulsar] nodece commented on a diff in pull request #20145: [fix][broker] Move superuser/tenantAdmin checks to AuthorizationService from PulsarAuthorizationProvider

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


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationService.java:
##########
@@ -183,7 +183,15 @@ public CompletableFuture<Boolean> canProduceAsync(TopicName topicName, String ro
         if (!this.conf.isAuthorizationEnabled()) {
             return CompletableFuture.completedFuture(true);
         }
-        return provider.allowTopicOperationAsync(topicName, role, TopicOperation.PRODUCE, authenticationData);
+
+        return isSuperUserOrAdmin(topicName.getTenant(), role, authenticationData)

Review Comment:
   @michaeljmarshall Do you have a new idea? IMO, I think this change makes sense.



-- 
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