diff --git a/auth-agents-common/src/main/java/org/apache/atlas/policytransformer/CachePolicyTransformerImpl.java b/auth-agents-common/src/main/java/org/apache/atlas/policytransformer/CachePolicyTransformerImpl.java index 66ca9f1e59..6f27c49983 100644 --- a/auth-agents-common/src/main/java/org/apache/atlas/policytransformer/CachePolicyTransformerImpl.java +++ b/auth-agents-common/src/main/java/org/apache/atlas/policytransformer/CachePolicyTransformerImpl.java @@ -284,12 +284,12 @@ private void setPolicyResources(RangerPolicy rangerPolicy, AtlasEntityHeader atl private void setPolicyResourcesForDatameshPolicies(RangerPolicy rangerPolicy, AtlasEntityHeader atlasPolicy) { Map resources = getFinalResources(atlasPolicy); - if (resources.containsKey("entity-classification")) { + if (!resources.containsKey("entity-classification")) { RangerPolicyResource resource = new RangerPolicyResource(Arrays.asList("*"), false, false); resources.put("entity-classification", resource); } - if (resources.containsKey("entity-type")) { + if (!resources.containsKey("entity-type")) { RangerPolicyResource resource = new RangerPolicyResource(Arrays.asList("*"), false, false); resources.put("entity-type", resource); }