cmccabe commented on a change in pull request #11806:
URL: https://github.com/apache/kafka/pull/11806#discussion_r815008336



##########
File path: 
metadata/src/main/java/org/apache/kafka/metadata/authorizer/StandardAuthorizerData.java
##########
@@ -391,11 +392,13 @@ static AuthorizationResult findResult(Action action,
                     if (!IMPLIES_DESCRIBE_CONFIGS.contains(acl.operation())) 
return null;
                     break;
                 default:
-                    if (!action.operation().equals(acl.operation())) return 
null;
+                    if (acl.operation() != ALL && action.operation() != 
acl.operation()) {

Review comment:
       Hmm, would it be easier to just put
   ```
   if (acl.operation() != ALL) {
   }
   ```
   
   around the whole block?
   
   So
   ```
   if (acl.operation() != ALL) {
     if (acl.permissionType().equals(ALLOW)) {
          .... switch stuff ...
       } else {
           if (!action.operation().equals(acl.operation())) return null;
       }
   }
   ```
   




-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to