Skip to content

Commit

Permalink
WIP for #312
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Sep 30, 2024
1 parent 449a8f9 commit 8754089
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/src/main/java/access/api/InvitationController.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@ public ResponseEntity<InvitationResponse> newInvitation(@Validated @RequestBody
}

List<Invitation> invitations = invitationRequest.getInvites().stream()
.filter(emailFormatValidator::isValid)
.filter(email -> {
boolean valid = emailFormatValidator.isValid(email);
if (!valid) {
LOG.debug("Not sending invalid email for invitation: " + email);
}
return valid;
})
.map(invitee -> new Invitation(
intendedAuthority,
HashGenerator.generateRandomHash(),
Expand Down
3 changes: 3 additions & 0 deletions server/src/main/java/access/model/Role.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public class Role implements Serializable, Provisionable {
@Column(name = "identifier")
private String identifier;

@Column(name = "organization_guid")
private String organizationGUID;

@Formula(value = "(SELECT COUNT(*) FROM user_roles ur WHERE ur.role_id=id)")
private Long userRoleCount;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE `roles`
add `organization_guid` varchar(255) DEFAULT NULL;

0 comments on commit 8754089

Please sign in to comment.