Skip to content

Use exact match in InvitationManager.getByEmail()#50095

Open
kota65535 wants to merge 1 commit into
keycloak:mainfrom
kota65535:vk/86dc-invitationmanage
Open

Use exact match in InvitationManager.getByEmail()#50095
kota65535 wants to merge 1 commit into
keycloak:mainfrom
kota65535:vk/86dc-invitationmanage

Conversation

@kota65535

@kota65535 kota65535 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Close: #50063

This PR adds an equalsIgnoreCase() filter to getByEmail() to ensure exact email matching.
getAllStream() is intentionally left unchanged to preserve the existing partial-match search behavior in the Admin UI.

Signed-off-by: Tomohiko Ozawa <kota65535@gmail.com>
@kota65535 kota65535 requested a review from a team as a code owner June 18, 2026 01:29
Copilot AI review requested due to automatic review settings June 18, 2026 01:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the InvitationManager SPI default lookup by email so that getByEmail() returns only an exact email match (case-insensitive), rather than potentially returning invitations whose email merely contains the provided value (depending on provider implementation).

Changes:

  • Add an in-stream exact-match filter (equalsIgnoreCase) to InvitationManager.getByEmail() results before returning the first match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to invite user to organization when their email is a substring of an already-invited email

2 participants