pulsar-commits mailing list archives

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

 ##########
 File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationService.java
 ##########
 @@ -187,7 +201,15 @@ public AuthorizationService(ServiceConfiguration conf, ConfigurationCacheService
             return CompletableFuture.completedFuture(true);
         }
         if (provider != null) {
-            return provider.canConsumeAsync(topicName, role, authenticationData, subscription);
+            return provider.isSuperUser(role).thenComposeAsync(isSuperUser -> {
+                if (isSuperUser) {
+                    CompletableFuture<Boolean> future = new CompletableFuture<>();
 
 Review comment:
   Same thing with completedFuture.

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