You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by co...@apache.org on 2017/03/13 16:01:16 UTC
ranger git commit: Ranger-1446: Ranger Solr Plugin does not work when
the collection list in the request is empty
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 <co...@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 <yz...@yahoo.com>
Authored: Mon Mar 13 08:15:58 2017 -0700
Committer: Colm O hEigeartaigh <co...@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;