This is an automated email from the ASF dual-hosted git repository.
nixon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new f15a569 ATLAS-3699 : Update authorization for Update-Entity for audit
logs for DENY policy
f15a569 is described below
commit f15a569626a853398ca8438f83b1fa8d5f3a36f3
Author: chaitali borole <[email protected]>
AuthorDate: Mon Mar 30 18:21:48 2020 +0530
ATLAS-3699 : Update authorization for Update-Entity for audit logs for DENY
policy
Signed-off-by: nixonrodrigues <[email protected]>
(cherry picked from commit 37d64be5c3f88de935919b806baafa5d8e250f5b)
---
.../apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java | 4 +---
.../org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java | 2 ++
2 files changed, 3 insertions(+), 3 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 ce0db4c..c1bf1a0 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
@@ -1065,7 +1065,7 @@ public class AtlasEntityStoreV2 implements
AtlasEntityStore {
}
}
- private EntityMutationResponse createOrUpdate(EntityStream entityStream,
boolean isPartialUpdate, boolean replaceClassifications, boolean
replaceBusinessAttributes) throws AtlasBaseException {
+ private EntityMutationResponse createOrUpdate(EntityStream
entityStream, boolean isPartialUpdate, boolean replaceClassifications, boolean
replaceBusinessAttributes) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> createOrUpdate()");
}
@@ -1269,8 +1269,6 @@ public class AtlasEntityStoreV2 implements
AtlasEntityStore {
requestContext.recordEntityGuidUpdate(entity, guid);
}
- entityGraphMapper.setCustomAttributes(vertex, entity);
-
context.addUpdated(guid, entity, entityType, vertex);
} else {
graphDiscoverer.validateAndNormalize(entity);
diff --git
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
index f4b1e55..fc432b4 100644
---
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
+++
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
@@ -273,6 +273,7 @@ public class EntityGraphMapper {
mapRelationshipAttributes(createdEntity, entityType, vertex,
CREATE, context);
mapAttributes(createdEntity, entityType, vertex, CREATE,
context);
+ setCustomAttributes(vertex,createdEntity);
resp.addEntity(CREATE, constructHeader(createdEntity,
entityType, vertex));
addClassifications(context, guid,
createdEntity.getClassifications());
@@ -292,6 +293,7 @@ public class EntityGraphMapper {
mapRelationshipAttributes(updatedEntity, entityType, vertex,
UPDATE, context);
mapAttributes(updatedEntity, entityType, vertex, UPDATE,
context);
+ setCustomAttributes(vertex,updatedEntity);
if (isPartialUpdate) {
resp.addEntity(PARTIAL_UPDATE,
constructHeader(updatedEntity, entityType, vertex));