mneethiraj commented on code in PR #410:
URL: https://github.com/apache/ranger/pull/410#discussion_r1833244672


##########
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java:
##########
@@ -1512,4 +1504,27 @@ private List<RangerConditionEvaluator> 
createPolicyConditionEvaluators(RangerPol
                return ret;
        }
 
+       private static boolean isMatchForResourceMatchingScope(final 
RangerAccessRequest.ResourceMatchingScope scope, final 
RangerPolicyResourceMatcher.MatchType matchType, boolean isAnyMatch) {
+               boolean ret = false;
+               if (isAnyMatch){
+                       ret = matchType !=  
RangerPolicyResourceMatcher.MatchType.NONE;
+               }
+               else if (scope!=null) {
+                               switch (scope) {
+                                               case SELF_OR_DESCENDANTS: {
+                                                       ret = matchType != 
RangerPolicyResourceMatcher.MatchType.NONE;

Review Comment:
   @fateh288  - my bad. The regression was for earlier comment. I agree that 
handling of ANCESTOR is outside the scope of this PR.



-- 
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