----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/75369/#review227286 -----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAuditPolicyEvaluator.java Lines 138 (patched) <https://reviews.apache.org/r/75369/#comment315535> Improved Code Suggestion: Instead of removing the final keyword from matchType, consider the following code: if (((RangerTagAccessRequest) request).getMatchType() == MatchType.ANCESTOR) { matchType = MatchType.SELF; } else { matchType = ((RangerTagAccessRequest) request).getMatchType(); } This approach improves code readability and avoids the need to remove the final keyword. Although making matchType final might seem unnecessary, it prevents accidental overwriting of its value within the same iteration. - Vyom Tiwari On March 12, 2025, 4:08 a.m., Dineshkumar Yadav wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/75369/ > ----------------------------------------------------------- > > (Updated March 12, 2025, 4:08 a.m.) > > > Review request for ranger, Kishor Gollapalliwar, Madhan Neethiraj, Mehul > Parikh, Pradeep Agrawal, Ramesh Mani, and Vyom Tiwari. > > > Bugs: RANGER-5162 > https://issues.apache.org/jira/browse/RANGER-5162 > > > Repository: ranger > > > Description > ------- > > Tag Allowed policy is not being enforced > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAuditPolicyEvaluator.java > 920ddc716 > > agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerDefaultPolicyEvaluator.java > 246cc4514 > > agents-common/src/main/java/org/apache/ranger/plugin/util/CachedResourceEvaluators.java > 99cb0f858 > > > Diff: https://reviews.apache.org/r/75369/diff/1/ > > > Testing > ------- > > Testing done using ranger docker with help of tag.json > > > Thanks, > > Dineshkumar Yadav > >