diff --git a/repository/src/main/java/org/apache/atlas/repository/store/aliasstore/ESAliasStore.java b/repository/src/main/java/org/apache/atlas/repository/store/aliasstore/ESAliasStore.java index c8ccfaf2a7..6e51565431 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/aliasstore/ESAliasStore.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/aliasstore/ESAliasStore.java @@ -204,15 +204,24 @@ private void personaPolicyToESDslClauses(List 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/*"))); + } } }