From 249e23cd1f36bd878c90c03fde872a40909029cf Mon Sep 17 00:00:00 2001 From: Vahid Hashemian Date: Thu, 25 May 2017 13:52:17 -0700 Subject: [PATCH] MINOR: Remove unused method parameter in `SimpleAclAuthorizer` --- .../scala/kafka/security/auth/SimpleAclAuthorizer.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/kafka/security/auth/SimpleAclAuthorizer.scala b/core/src/main/scala/kafka/security/auth/SimpleAclAuthorizer.scala index 19fbdc4dca39..0e78f524b05b 100644 --- a/core/src/main/scala/kafka/security/auth/SimpleAclAuthorizer.scala +++ b/core/src/main/scala/kafka/security/auth/SimpleAclAuthorizer.scala @@ -125,7 +125,7 @@ class SimpleAclAuthorizer extends Authorizer with Logging { val acls = getAcls(resource) ++ getAcls(new Resource(resource.resourceType, Resource.WildCardResource)) //check if there is any Deny acl match that would disallow this operation. - val denyMatch = aclMatch(session, operation, resource, principal, host, Deny, acls) + val denyMatch = aclMatch(operation, resource, principal, host, Deny, acls) //if principal is allowed to read, write or delete we allow describe by default, the reverse does not apply to Deny. val ops = if (Describe == operation) @@ -134,7 +134,7 @@ class SimpleAclAuthorizer extends Authorizer with Logging { Set[Operation](operation) //now check if there is any allow acl that will allow this operation. - val allowMatch = ops.exists(operation => aclMatch(session, operation, resource, principal, host, Allow, acls)) + val allowMatch = ops.exists(operation => aclMatch(operation, resource, principal, host, Allow, acls)) //we allow an operation if a user is a super user or if no acls are found and user has configured to allow all users //when no acls are found or if no deny acls are found and at least one allow acls matches. @@ -160,7 +160,7 @@ class SimpleAclAuthorizer extends Authorizer with Logging { } else false } - private def aclMatch(session: Session, operations: Operation, resource: Resource, principal: KafkaPrincipal, host: String, permissionType: PermissionType, acls: Set[Acl]): Boolean = { + private def aclMatch(operations: Operation, resource: Resource, principal: KafkaPrincipal, host: String, permissionType: PermissionType, acls: Set[Acl]): Boolean = { acls.find { acl => acl.permissionType == permissionType && (acl.principal == principal || acl.principal == Acl.WildCardPrincipal) &&