You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sa...@apache.org on 2021/02/19 05:34:51 UTC
[atlas] branch master updated: ATLAS-4170: Fixed Bulk Entity GET
API to skip unauthorised entities when skipFailedEntities is passed as True
This is an automated email from the ASF dual-hosted git repository.
sarath pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 928d868 ATLAS-4170: Fixed Bulk Entity GET API to skip unauthorised entities when skipFailedEntities is passed as True
928d868 is described below
commit 928d86864b6e4c9244cd77c18c1d3d54d6a6a836
Author: sidmishra <si...@cloudera.com>
AuthorDate: Thu Feb 18 18:00:54 2021 -0800
ATLAS-4170: Fixed Bulk Entity GET API to skip unauthorised entities when skipFailedEntities is passed as True
Signed-off-by: Sarath Subramanian <sa...@apache.org>
---
.../apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
index ce58e9a..e6fe306 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
@@ -214,9 +214,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
if(ret != null){
for(String guid : guids) {
+ AtlasEntity entity = ret.getEntity(guid);
try {
- AtlasEntity entity = ret.getEntity(guid);
-
AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_READ, new AtlasEntityHeader(entity)), "read entity: guid=", guid);
} catch (AtlasBaseException e) {
if (RequestContext.get().isSkipFailedEntities()) {
@@ -224,7 +223,10 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
LOG.debug("getByIds(): ignoring failure for entity {}: error code={}, message={}", guid, e.getAtlasErrorCode(), e.getMessage());
}
+ //Remove from referred entities
ret.removeEntity(guid);
+ //Remove from entities
+ ret.removeEntity(entity);
continue;
}