Commit be72862b authored by Bill Wang's avatar Bill Wang Committed by Spencer Sutton
Browse files

Revert "inspect check gate for user node exist"

This reverts commit 5705854039caf2328c300ac80c6af612c82ed8f8.
parent 99a89a79
...@@ -40,12 +40,7 @@ public class AddMemberService { ...@@ -40,12 +40,7 @@ public class AddMemberService {
log.info(String.format("requested by %s", addMemberServiceDto.getRequesterId())); log.info(String.format("requested by %s", addMemberServiceDto.getRequesterId()));
String memberDesId = addMemberDto.getEmail(); String memberDesId = addMemberDto.getEmail();
EntityNode memberNode = retrieveGroupRepo.getEntityNode(memberDesId, addMemberServiceDto.getPartitionId()).orElseGet( EntityNode memberNode = retrieveGroupRepo.getEntityNode(memberDesId, addMemberServiceDto.getPartitionId()).orElseGet(
() -> createNewMemberNode(addMemberDto.getEmail(), memberDesId, addMemberServiceDto.getPartitionId()));
() -> {
System.out.println("No user Node found, adding it");
return createNewMemberNode(addMemberDto.getEmail(), memberDesId, addMemberServiceDto.getPartitionId());
}
);
EntityNode existingGroupEntityNode = retrieveGroupRepo.groupExistenceValidation(addMemberServiceDto.getGroupEmail(), addMemberServiceDto.getPartitionId()); EntityNode existingGroupEntityNode = retrieveGroupRepo.groupExistenceValidation(addMemberServiceDto.getGroupEmail(), addMemberServiceDto.getPartitionId());
EntityNode requesterNode = EntityNode.createMemberNodeForRequester(addMemberServiceDto.getRequesterId(), addMemberServiceDto.getPartitionId()); EntityNode requesterNode = EntityNode.createMemberNodeForRequester(addMemberServiceDto.getRequesterId(), addMemberServiceDto.getPartitionId());
if (!permissionService.hasOwnerPermissionOf(requesterNode, existingGroupEntityNode)) { if (!permissionService.hasOwnerPermissionOf(requesterNode, existingGroupEntityNode)) {
......
...@@ -81,9 +81,7 @@ public class AwsRetrieveGroupRepo implements RetrieveGroupRepo { ...@@ -81,9 +81,7 @@ public class AwsRetrieveGroupRepo implements RetrieveGroupRepo {
commands.select(config.getPartitionEntityNode()); commands.select(config.getPartitionEntityNode());
String groupNodeJson = commands.get(entityEmail); String groupNodeJson = commands.get(entityEmail);
EntityNode groupNode = null; EntityNode groupNode = null;
System.out.println("The value of GropNodeJson is " +groupNodeJson);
if (!StringUtils.isEmpty(groupNodeJson)) { if (!StringUtils.isEmpty(groupNodeJson)) {
groupNode = JsonConverter.fromJson(groupNodeJson, EntityNode.class); groupNode = JsonConverter.fromJson(groupNodeJson, EntityNode.class);
} }
return Optional.ofNullable(groupNode); return Optional.ofNullable(groupNode);
......
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