Commit 65a62b05 by nixonrodrigues

ATLAS-3550 :- Add authorize check for partialUpdateEntityAttrByGuid API call

parent 1e0962d7
......@@ -376,6 +376,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
entity.setGuid(guid);
AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_UPDATE, new AtlasEntityHeader(entity)), "update entity ByUniqueAttributes");
return createOrUpdate(new AtlasEntityStream(updatedEntityInfo), true, false);
}
......@@ -391,6 +393,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
AtlasEntityType entityType = (AtlasEntityType) typeRegistry.getType(entity.getTypeName());
AtlasAttribute attr = entityType.getAttribute(attrName);
AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_UPDATE, entity), "update entity ByUniqueAttributes : guid=", guid );
if (attr == null) {
attr = entityType.getRelationshipAttribute(attrName, AtlasEntityUtil.getRelationshipType(attrValue));
......
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