pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on a change in pull request #6708: Issue 6702: add isSuperUser in AuthorizationProvider interface
Date Fri, 10 Apr 2020 11:04:34 GMT
sijie commented on a change in pull request #6708: Issue 6702: add isSuperUser in AuthorizationProvider
interface
URL: https://github.com/apache/pulsar/pull/6708#discussion_r406710952
 
 

 ##########
 File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationProvider.java
 ##########
 @@ -47,6 +47,19 @@
         return CompletableFuture.completedFuture(role != null && superUserRoles.contains(role)
? true : false);
     }
 
+    /**
+     * Check if specified role is a super user
+     * @param role the role to check
+     * @param authenticationData authentication data related to the role
+     * @return a CompletableFuture containing a boolean in which true means the role is a
super user
+     * and false if it is not
+     */
+    default CompletableFuture<Boolean> isSuperUser(String role,
 
 Review comment:
   Don't you need to change the code to use this new method? Otherwise, how can an authorization
provider leverage `AuthenticationDataSource`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message