From f42ed95fb3d4064648a7d5e5aa76c14da3eb3e5f Mon Sep 17 00:00:00 2001 From: Nikhil P Bonte Date: Tue, 2 Apr 2024 01:06:41 +0530 Subject: [PATCH] fix dataproduct visibility policies resources issue --- .../atlas/policytransformer/CachePolicyTransformerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }