nixonrodrigues commented on code in PR #734:
URL: https://github.com/apache/atlas/pull/734#discussion_r3841430864
##########
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/ClassificationAssociator.java:
##########
@@ -86,14 +96,28 @@ public AtlasEntityHeaders get(long fromTimestamp, long
toTimestamp) throws Atlas
private AtlasEntityHeader getEntityHeaderByGuid(String guid) {
try {
- return
entityRetriever.toAtlasEntityHeaderWithClassifications(guid);
+ AtlasEntityHeader entityHeader =
entityRetriever.toAtlasEntityHeaderWithClassifications(guid);
+
+ if (entityHeader == null ||
!isEntityReadAllowed(entityHeader)) {
+ return null;
+ }
+
+ return entityHeader;
} catch (AtlasBaseException e) {
LOG.error("Error fetching entity: {}", guid, e);
}
return null;
}
+ private boolean isEntityReadAllowed(AtlasEntityHeader entityHeader) {
+ if (typeRegistry == null) {
+ return true;
Review Comment:
if typeRegistry is null, entity access should be true/false ? please review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]