pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jerrypeng commented on a change in pull request #3383: refactor AuthorizationProvider interface to allow custom logic for determining super user
Date Thu, 17 Jan 2019 23:40:34 GMT
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

Mime
View raw message