ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ab...@apache.org
Subject ranger git commit: RANGER-2066: Fix regression
Date Wed, 18 Apr 2018 21:53:05 GMT
Repository: ranger
Updated Branches:
  refs/heads/ranger-0.7 9e7760c6f -> 7e3963bc7


RANGER-2066: Fix regression


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

Branch: refs/heads/ranger-0.7
Commit: 7e3963bc76e452504c6551cc787c35b556d0fd7d
Parents: 9e7760c
Author: Abhay Kulkarni <akulkarni@hortonworks.com>
Authored: Wed Apr 18 14:33:34 2018 -0700
Committer: Abhay Kulkarni <akulkarni@hortonworks.com>
Committed: Wed Apr 18 14:33:34 2018 -0700

----------------------------------------------------------------------
 .../policyevaluator/RangerDefaultPolicyEvaluator.java     | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/7e3963bc/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java
----------------------------------------------------------------------
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java
b/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java
index b1d6337..6126f60 100644
--- a/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java
@@ -493,12 +493,10 @@ public class RangerDefaultPolicyEvaluator extends RangerAbstractPolicyEvaluator
 					result.setReason(matchedPolicyItem.getComments());
 				}
 			} else {
-				if(isResourceMatch || request.isAccessTypeAny()) {
-					if(! result.getIsAllowed()) { // if access is not yet allowed by another policy
-						result.setIsAllowed(true);
-						result.setPolicyId(policy.getId());
-						result.setReason(matchedPolicyItem.getComments());
-					}
+				if(! result.getIsAllowed()) { // if access is not yet allowed by another policy
+					result.setIsAllowed(true);
+					result.setPolicyId(policy.getId());
+					result.setReason(matchedPolicyItem.getComments());
 				}
 			}
 		}


Mime
View raw message