Technoboy- commented on code in PR #20478:
URL: https://github.com/apache/pulsar/pull/20478#discussion_r1216022135


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:
##########
@@ -650,29 +650,18 @@ protected CompletableFuture<Void> 
internalGrantPermissionOnSubscriptionAsync(Str
     protected CompletableFuture<Void> 
internalRevokePermissionsOnNamespaceAsync(String role) {
         return validateNamespaceOperationAsync(namespaceName, 
NamespaceOperation.REVOKE_PERMISSION)
                 .thenAccept(__ -> checkNotNull(role, "Role should not be 
null"))
-                .thenCompose(__ -> validatePoliciesReadOnlyAccessAsync())
-                .thenCompose(__ -> updatePoliciesAsync(namespaceName, policies 
-> {
-                    
policies.auth_policies.getNamespaceAuthentication().remove(role);
-                    return policies;
-                }));
+                .thenCompose(__ -> 
getAuthorizationService().revokePermissionAsync(namespaceName, role));
     }
 
     protected CompletableFuture<Void> 
internalRevokePermissionsOnSubscriptionAsync(String subscriptionName,
                                                                                
   String role) {
-        AuthorizationService authService = 
pulsar().getBrokerService().getAuthorizationService();
-        if (null != authService) {

Review Comment:
   I think `authService ` should not be null. 
   
   > There are still 2 other references in this file 
   
   I have removed them



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to