You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/01/17 23:40:34 UTC

[GitHub] jerrypeng commented on a change in pull request #3383: refactor AuthorizationProvider interface to allow custom logic for determining super user

jerrypeng commented on a change in pull request #3383:  refactor AuthorizationProvider interface to allow custom logic for determining super user
URL: https://github.com/apache/pulsar/pull/3383#discussion_r248882747
 
 

 ##########
 File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationService.java
 ##########
 @@ -164,9 +173,16 @@ public AuthorizationService(ServiceConfiguration conf, ConfigurationCacheService
         if (!this.conf.isAuthorizationEnabled()) {
             return CompletableFuture.completedFuture(true);
         }
-
         if (provider != null) {
-            return provider.canProduceAsync(topicName, role, authenticationData);
+            return provider.isSuperUser(role).thenComposeAsync(isSuperUser -> {
+                if (isSuperUser) {
+                    CompletableFuture<Boolean> future = new CompletableFuture<>();
 
 Review comment:
   will fix

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services