fateh288 commented on code in PR #588:
URL: https://github.com/apache/ranger/pull/588#discussion_r2143307798


##########
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java:
##########
@@ -613,8 +613,12 @@ protected void evaluatePolicyItems(RangerAccessRequest 
request, MatchType matchT
                             if (getPolicyPriority() >= oldPriority && 
allowResult != null && (oneRequest.isAccessTypeAny() || 
RangerAccessRequestUtil.getIsAnyAccessInContext(oneRequest.getContext()))) {
                                 accessTypeResults.put(accessType, allowResult);
                             } else {
-                                if (getPolicyPriority() > oldPriority && 
denyResult != null) {
-                                    accessTypeResults.put(accessType, 
denyResult);
+                                if (getPolicyPriority() > oldPriority) {
+                                    if (allowResult != null) {

Review Comment:
   The below condition will be false for the scenario being tested because 
access type any would be false, but we still would want allowResult to override 
the previous result
   `&& (oneRequest.isAccessTypeAny() || 
RangerAccessRequestUtil.getIsAnyAccessInContext(oneRequest.getContext())`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ranger.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to