mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-16 20:15:46 -06:00
Missing message properties when rendering pages for organization invites
Closes #44113 Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
@@ -115,7 +115,8 @@ public class InviteOrgActionTokenHandler extends AbstractActionTokenHandler<Invi
|
||||
event.user(user).error(Errors.USER_ORG_MEMBER_ALREADY);
|
||||
return session.getProvider(LoginFormsProvider.class)
|
||||
.setAuthenticationSession(authSession)
|
||||
.setInfo(Messages.ORG_MEMBER_ALREADY, user.getUsername())
|
||||
.setAttribute("messageHeader", Messages.STALE_INVITE_ORG_LINK)
|
||||
.setInfo(Messages.ORG_MEMBER_ALREADY, user.getUsername(), organization.getName())
|
||||
.setAttribute("pageRedirectUri", organization.getRedirectUrl())
|
||||
.createInfoPage();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.empty;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.keycloak.services.messages.Messages.ORG_MEMBER_ALREADY;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
@@ -146,7 +145,7 @@ public class OrganizationInvitationLinkTest extends AbstractOrganizationTest {
|
||||
String link = getInvitationLinkFromEmail(user.getFirstName(), user.getLastName());
|
||||
driver.navigate().to(link);
|
||||
|
||||
assertThat(driver.getPageSource(), containsString(ORG_MEMBER_ALREADY));
|
||||
assertThat(driver.getPageSource(), containsString("You are already a member of the neworg organization."));
|
||||
|
||||
infoPage.clickBackToApplicationLink();
|
||||
// redirect to the redirectUrl of the organization
|
||||
|
||||
@@ -559,3 +559,5 @@ organization.select=Select an organization to proceed:
|
||||
notMemberOfOrganization=User is not a member of the organization {0}
|
||||
notMemberOfAnyOrganization=User is not a member of any organization
|
||||
emailVerificationPending=A verification email was sent to {0}. You can submit without changes to resend the verification email, or enter a different email address.
|
||||
orgMemberAlready=You are already a member of the {1} organization.
|
||||
staleInviteOrgLink=The link you clicked is no longer valid. It may have expired or already been used.
|
||||
|
||||
Reference in New Issue
Block a user