kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: MINOR: Remove unused method parameter in `SimpleAclAuthorizer`
Date Sat, 27 May 2017 09:19:17 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk eb3aae7a0 -> b50387eb7


MINOR: Remove unused method parameter in `SimpleAclAuthorizer`

Author: Vahid Hashemian <vahidhashemian@us.ibm.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #3147 from vahidhashemian/minor/remove_unsed_method_parameter_simpleaclauthorizer


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/b50387eb
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/b50387eb
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/b50387eb

Branch: refs/heads/trunk
Commit: b50387eb7c7be978081ecce7724f3058e679e4b8
Parents: eb3aae7
Author: Vahid Hashemian <vahidhashemian@us.ibm.com>
Authored: Sat May 27 10:19:15 2017 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Sat May 27 10:19:15 2017 +0100

----------------------------------------------------------------------
 .../main/scala/kafka/security/auth/SimpleAclAuthorizer.scala   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/b50387eb/core/src/main/scala/kafka/security/auth/SimpleAclAuthorizer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/security/auth/SimpleAclAuthorizer.scala b/core/src/main/scala/kafka/security/auth/SimpleAclAuthorizer.scala
index 19fbdc4..0e78f52 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) &&


Mime
View raw message