Skip to content

Commit

Permalink
Fix alias for Product and Sub-domain read
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilbonte21 committed Nov 30, 2023
1 parent 1f0561e commit 0578ffe
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,19 @@ private void personaPolicyToESDslClauses(List<AtlasEntity> policies,
} else if (getPolicyActions(policy).contains(ACCESS_READ_PERSONA_SUB_DOMAIN)) {
for (String asset : assets) {
//terms.add(asset);
allowClauseList.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, asset + "/domain/*")));
List<Map<String, Object>> mustMap = new ArrayList<>();
mustMap.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, asset + "/domain/*")));
mustMap.add(mapOf("term", mapOf("__typeName", "DataDomain")));
allowClauseList.add(mapOf("bool", mapOf("must", mustMap)));
}

} else if (getPolicyActions(policy).contains(ACCESS_READ_PERSONA_PRODUCT)) {
for (String asset : assets) {
//terms.add(asset);
allowClauseList.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, asset + "/*/product/*")));
List<Map<String, Object>> mustMap = new ArrayList<>();
mustMap.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, asset + "/*/product/*")));
mustMap.add(mapOf("term", mapOf("__typeName", "DataProduct")));
allowClauseList.add(mapOf("bool", mapOf("must", mustMap)));
}
}
}
Expand Down

0 comments on commit 0578ffe

Please sign in to comment.