You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/02/11 15:37:10 UTC

[GitHub] [kafka] jsancio commented on a change in pull request #11745: KAFKA-13661; Consistent permissions for CreatePartitions API

jsancio commented on a change in pull request #11745:
URL: https://github.com/apache/kafka/pull/11745#discussion_r804762258



##########
File path: core/src/main/scala/kafka/server/ControllerApis.scala
##########
@@ -725,13 +731,7 @@ class ControllerApis(val requestChannel: RequestChannel,
         setErrorMessage("Duplicate topic name."))
         topicNames.remove(topicName)
     }
-    val authorizedTopicNames = {
-      if (hasClusterAuth) {
-        topicNames.asScala
-      } else {
-        getCreatableTopics(topicNames.asScala)
-      }
-    }
+    val authorizedTopicNames = getAlterAuthorizedTopics(topicNames.asScala)
     val topics = new util.ArrayList[CreatePartitionsTopic]
     topicNames.forEach { topicName =>
       if (authorizedTopicNames.contains(topicName)) {

Review comment:
       I get the impression that this call doesn't preserve that the order of topics in the request is the same as the order of topics in the response. KIP-195 doesn't say anything about this so it is probably okay for them to have a different order.




-- 
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-unsubscribe@kafka.apache.org

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