Skip to content

Commit

Permalink
Persona alias for product and sub-domain reads
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilbonte21 committed Nov 30, 2023
1 parent fab17a8 commit 81833a1
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,24 @@ private void personaPolicyToESDslClauses(List<AtlasEntity> policies,
terms.add(glossaryQName);
allowClauseList.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, "*@" + glossaryQName)));
}
} else if (getPolicyActions(policy).contains(ACCESS_READ_PERSONA_DOMAIN)
|| getPolicyActions(policy).contains(ACCESS_READ_PERSONA_SUB_DOMAIN)
|| getPolicyActions(policy).contains(ACCESS_READ_PERSONA_PRODUCT)) {
} else if (getPolicyActions(policy).contains(ACCESS_READ_PERSONA_DOMAIN)) {

for (String asset : assets) {
terms.add(asset);
allowClauseList.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, asset + "/*")));
}

} 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/*")));
}

} 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/*")));
}
}
}

Expand Down

0 comments on commit 81833a1

Please sign in to comment.