diff --git a/server/src/main/java/access/api/InvitationController.java b/server/src/main/java/access/api/InvitationController.java index 6eb7a627..f741a2fb 100644 --- a/server/src/main/java/access/api/InvitationController.java +++ b/server/src/main/java/access/api/InvitationController.java @@ -110,7 +110,13 @@ public ResponseEntity newInvitation(@Validated @RequestBody } List 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(), diff --git a/server/src/main/java/access/model/Role.java b/server/src/main/java/access/model/Role.java index 04e32275..ff4baf6e 100644 --- a/server/src/main/java/access/model/Role.java +++ b/server/src/main/java/access/model/Role.java @@ -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; diff --git a/server/src/main/resources/db/mysql/migration/V33_0__user_institution_admin.sql b/server/src/main/resources/db/mysql/migration/V33_0__user_institution_admin.sql new file mode 100644 index 00000000..dd050d82 --- /dev/null +++ b/server/src/main/resources/db/mysql/migration/V33_0__user_institution_admin.sql @@ -0,0 +1,2 @@ +ALTER TABLE `roles` + add `organization_guid` varchar(255) DEFAULT NULL;