When getting just the email for invitation, find it's user and set it's
id to the invited user
This commit is contained in:
parent
5a5043f432
commit
08271c88cb
|
@ -35,6 +35,10 @@ public class InvitationsManager {
|
|||
public void inviteUsers(Invitation invitation, Principal principal) throws Exception {
|
||||
UserInfo principalUser = new UserInfo();
|
||||
principalUser.setId(principal.getId());
|
||||
invitation.getUsers().stream().filter(item -> item.getId() == null).forEach(item -> {
|
||||
UUID id = apiContext.getOperationsContext().getDatabaseRepository().getUserInfoDao().asQueryable().where((builder, root) -> builder.equal(root.get("email"), item.getEmail())).getSingle().getId();
|
||||
item.setId(id);
|
||||
});
|
||||
List<UserInfoInvitationModel> alreadySignedInUsers = invitation.getUsers().stream().filter(item -> item.getId() != null).collect(Collectors.toList());
|
||||
List<UserInfo> alreadySignedInUsersEntities = alreadySignedInUsers.stream().map(UserInfoInvitationModel::toDataModel).collect(Collectors.toList());
|
||||
List<UserDMP> userInfoToUserDmp = new LinkedList<>();
|
||||
|
|
Loading…
Reference in New Issue