Commit 37d64be5 by chaitali borole Committed by nixonrodrigues

ATLAS-3699 : Update authorization for Update-Entity for audit logs for DENY policy

parent 4d0f5ce2
...@@ -1070,7 +1070,7 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore { ...@@ -1070,7 +1070,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()) { if (LOG.isDebugEnabled()) {
LOG.debug("==> createOrUpdate()"); LOG.debug("==> createOrUpdate()");
} }
...@@ -1274,8 +1274,6 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore { ...@@ -1274,8 +1274,6 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
requestContext.recordEntityGuidUpdate(entity, guid); requestContext.recordEntityGuidUpdate(entity, guid);
} }
entityGraphMapper.setCustomAttributes(vertex, entity);
context.addUpdated(guid, entity, entityType, vertex); context.addUpdated(guid, entity, entityType, vertex);
} else { } else {
graphDiscoverer.validateAndNormalize(entity); graphDiscoverer.validateAndNormalize(entity);
......
...@@ -273,6 +273,7 @@ public class EntityGraphMapper { ...@@ -273,6 +273,7 @@ public class EntityGraphMapper {
mapRelationshipAttributes(createdEntity, entityType, vertex, CREATE, context); mapRelationshipAttributes(createdEntity, entityType, vertex, CREATE, context);
mapAttributes(createdEntity, entityType, vertex, CREATE, context); mapAttributes(createdEntity, entityType, vertex, CREATE, context);
setCustomAttributes(vertex,createdEntity);
resp.addEntity(CREATE, constructHeader(createdEntity, entityType, vertex)); resp.addEntity(CREATE, constructHeader(createdEntity, entityType, vertex));
addClassifications(context, guid, createdEntity.getClassifications()); addClassifications(context, guid, createdEntity.getClassifications());
...@@ -292,6 +293,7 @@ public class EntityGraphMapper { ...@@ -292,6 +293,7 @@ public class EntityGraphMapper {
mapRelationshipAttributes(updatedEntity, entityType, vertex, UPDATE, context); mapRelationshipAttributes(updatedEntity, entityType, vertex, UPDATE, context);
mapAttributes(updatedEntity, entityType, vertex, UPDATE, context); mapAttributes(updatedEntity, entityType, vertex, UPDATE, context);
setCustomAttributes(vertex,updatedEntity);
if (isPartialUpdate) { if (isPartialUpdate) {
resp.addEntity(PARTIAL_UPDATE, constructHeader(updatedEntity, entityType, vertex)); resp.addEntity(PARTIAL_UPDATE, constructHeader(updatedEntity, entityType, vertex));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment