Skip to content

Commit 81b3151

Browse files
authored
Update RangerPolicyEngineImpl.java
1 parent b15046e commit 81b3151

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ private void updateFromGdsResult(RangerAccessResult result) {
10821082
}
10831083
} else if (result.getPolicyType() == RangerPolicy.POLICY_TYPE_ROWFILTER) {
10841084
// pick row-filter from GDS policies only if there is no decision yet
1085-
if (result.getPolicyId() != -1 && CollectionUtils.isNotEmpty(gdsResult.getRowFilters())) {
1085+
if (result.getPolicyId() == -1 && CollectionUtils.isNotEmpty(gdsResult.getRowFilters())) {
10861086
result.setIsAllowed(true);
10871087
result.setIsAccessDetermined(true);
10881088
result.setPolicyId(gdsResult.getPolicyId());
@@ -1092,7 +1092,7 @@ private void updateFromGdsResult(RangerAccessResult result) {
10921092
}
10931093
} else if (result.getPolicyType() == RangerPolicy.POLICY_TYPE_DATAMASK) {
10941094
// pick data-mask from GDS policies only if there is no decision yet
1095-
if (result.getPolicyId() != -1 && StringUtils.isNotEmpty(gdsResult.getMaskType())) {
1095+
if (result.getPolicyId() == -1 && StringUtils.isNotEmpty(gdsResult.getMaskType())) {
10961096
result.setIsAllowed(true);
10971097
result.setIsAccessDetermined(true);
10981098
result.setPolicyId(gdsResult.getPolicyId());

0 commit comments

Comments
 (0)