diff --git a/server/src/main/resources/templates/invitation_en.html b/server/src/main/resources/templates/invitation_en.html index 12958632..3f379813 100644 --- a/server/src/main/resources/templates/invitation_en.html +++ b/server/src/main/resources/templates/invitation_en.html @@ -4,13 +4,13 @@ {{title}} -
+
{{#institutionLogoUrl}} - logo + logo {{/institutionLogoUrl}} {{#isInstitutionSurf}} - logo + logo {{/isInstitutionSurf}}
@@ -41,47 +41,59 @@
{{/message}} {{#useEduID}} -

You accept the role(s) by logging in with eduID. If you don’t have one yet, you can create it right away.

-
- - {{> eduID-logo-square.svg}} - Continue with eduID - -
+

You accept the role(s) by logging in with eduID. If you don't have one yet, you can create it right away.

+ + + + +
+ + + + + + +
+ {{> eduID-logo-square.svg}} + + Continue with eduID +
+
+

or copy this link into your browser: {{{ url }}}

{{/useEduID}} {{^useEduID}}

You accept the role(s) by logging in with SURFconext.

-
- - Continue - -
+ + + + +
+ + Continue + +

or copy this link into your browser: {{{ url }}}

{{/useEduID}}
- - + \ No newline at end of file diff --git a/server/src/main/resources/templates/invitation_nl.html b/server/src/main/resources/templates/invitation_nl.html index 33efc568..2093f91a 100644 --- a/server/src/main/resources/templates/invitation_nl.html +++ b/server/src/main/resources/templates/invitation_nl.html @@ -4,13 +4,14 @@ {{title}} -
+
+
{{#institutionLogoUrl}} - logo + logo {{/institutionLogoUrl}} {{#isInstitutionSurf}} - logo + logo {{/isInstitutionSurf}}
@@ -42,46 +43,58 @@ {{/message}} {{#useEduID}}

De rol(len) accepteer je door in te loggen met eduID. Als je deze nog niet hebt, kun je hem gelijk aanmaken.

- + + + + +
+ + + + + + +
+ {{> eduID-logo-square.svg}} + + Ga door met eduID +
+
+

of kopieer deze link in je browser: {{{ url }}}

{{/useEduID}} {{^useEduID}}

De rol(len) accepteer je door in te loggen met SURFconext.

- + + + + +
+ + Ga door + +

of kopieer deze link in je browser: {{{ url }}}

{{/useEduID}}
- - + \ No newline at end of file diff --git a/server/src/test/java/invite/api/InvitationControllerTest.java b/server/src/test/java/invite/api/InvitationControllerTest.java index dd6446db..d32b1eee 100644 --- a/server/src/test/java/invite/api/InvitationControllerTest.java +++ b/server/src/test/java/invite/api/InvitationControllerTest.java @@ -748,6 +748,29 @@ void resendInviteMailExpirationDate() throws Exception { assertTrue(savedInvitation.getExpiryDate().isAfter(Instant.now().plus(13, ChronoUnit.DAYS))); } + @Test + void resendInviteMailExpirationDateNL() throws Exception { + AccessCookieFilter accessCookieFilter = openIDConnectFlow("/api/v1/users/login", INVITER_SUB); + Invitation invitation = invitationRepository.findByHash(Authority.GUEST.name()).get(); + invitation.setExpiryDate(Instant.now().minus(5, ChronoUnit.DAYS)); + invitation.setLanguage(Language.nl); + invitationRepository.save(invitation); + + super.stubForManageProviderById(EntityType.OIDC10_RP, "5"); + given() + .when() + .filter(accessCookieFilter.cookieFilter()) + .accept(ContentType.JSON) + .header(accessCookieFilter.csrfToken().getHeaderName(), accessCookieFilter.csrfToken().getToken()) + .contentType(ContentType.JSON) + .pathParam("id", invitation.getId()) + .put("/api/v1/invitations/{id}") + .then() + .statusCode(201); + Invitation savedInvitation = invitationRepository.findByHash(Authority.GUEST.name()).get(); + assertTrue(savedInvitation.getExpiryDate().isAfter(Instant.now().plus(13, ChronoUnit.DAYS))); + } + @Test void invitationsSearchSuperUser() throws Exception { AccessCookieFilter accessCookieFilter = openIDConnectFlow("/api/v1/users/login", SUPER_SUB);