List<Invitation> invitations = invitationService.getAll(domain.getId());
List<InviteeForm> inviteeForms = new ArrayList<InviteeForm>();
for (Invitation invitation : invitations) {
InviteeForm inviteeForm = new InviteeForm();
inviteeForm.setId(invitation.getId());
inviteeForm.setEmail(invitation.getEmail());
inviteeForm.setUserRole(invitation.getRole().getUserRole());
inviteeForms.add(inviteeForm);
}
model.addAttribute("inviteeForms", inviteeForms);
model.addAttribute("domainId", domain.getId());
model.addAttribute("domainType", domain.getDomainType().name());