clolov commented on code in PR #18432:
URL: https://github.com/apache/kafka/pull/18432#discussion_r1910661898


##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -2647,31 +2612,12 @@ class KafkaApis(val requestChannel: RequestChannel,
     zkSupport.controller.listPartitionReassignments(partitionsOpt, 
sendResponseCallback)
   }
 
-  private def configsAuthorizationApiError(resource: ConfigResource): ApiError 
= {
-    val error = resource.`type` match {
-      case ConfigResource.Type.BROKER | ConfigResource.Type.BROKER_LOGGER => 
Errors.CLUSTER_AUTHORIZATION_FAILED
-      case ConfigResource.Type.TOPIC => Errors.TOPIC_AUTHORIZATION_FAILED
-      case ConfigResource.Type.GROUP => Errors.GROUP_AUTHORIZATION_FAILED
-      case rt => throw new InvalidRequestException(s"Unexpected resource type 
$rt for resource ${resource.name}")
-    }
-    new ApiError(error, null)
-  }
-
   def handleIncrementalAlterConfigsRequest(request: RequestChannel.Request): 
Unit = {
     val original = request.body[IncrementalAlterConfigsRequest]
     val preprocessingResponses = configManager.preprocess(original.data(),
       (rType, rName) => authHelper.authorize(request.context, ALTER_CONFIGS, 
rType, rName))

Review Comment:
   Got it, thank you!



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