ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject ranger git commit: Ranger-1446: Ranger Solr Plugin does not work when the collection list in the request is empty
Date Mon, 13 Mar 2017 16:01:16 GMT
Repository: ranger
Updated Branches:
  refs/heads/master c80d81189 -> e02967f38


Ranger-1446: Ranger Solr Plugin does not work when the collection list in the request is empty

Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>


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

Branch: refs/heads/master
Commit: e02967f38993dce2d59bc2dc58a4a3227cd89b7b
Parents: c80d811
Author: yzhou2001 <yzhou_1999@yahoo.com>
Authored: Mon Mar 13 08:15:58 2017 -0700
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Mar 13 16:00:26 2017 +0000

----------------------------------------------------------------------
 .../authorization/solr/authorizer/RangerSolrAuthorizer.java     | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/e02967f3/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
----------------------------------------------------------------------
diff --git a/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
b/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
index 6160438..6ac0a1f 100644
--- a/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
+++ b/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
@@ -158,7 +158,7 @@ public class RangerSolrAuthorizer implements AuthorizationPlugin {
 	 */
 	@Override
 	public AuthorizationResponse authorize(AuthorizationContext context) {
-		boolean isDenied = true;
+		boolean isDenied = false;
 
 		try {
 			if (logger.isDebugEnabled()) {
@@ -209,14 +209,13 @@ public class RangerSolrAuthorizer implements AuthorizationPlugin {
 						isDenied = true;
 						// rejecting on first failure
 						break;
-					} else {
-						isDenied = false;
 					}
 				}
 			} finally {
 				auditHandler.flushAudit();
 			}
 		} catch (Throwable t) {
+			isDenied = true;
 			MiscUtil.logErrorMessageByInterval(logger, t.getMessage(), t);
 		}
 		AuthorizationResponse response = null;


Mime
View raw message