Limit organisation choice based on email#2963
Open
stephencdaly wants to merge 7 commits into
Open
Conversation
stephencdaly
force-pushed
the
limit-organisation-choice-based-on-email
branch
2 times, most recently
from
July 23, 2026 16:33
938ebee to
627899f
Compare
If this feature flag is enabled, we will only show the user organisations with domains that match their email address when they are asked to choose an organisation.
If the show_relevant_organisations feature flag is enabled, only include organisations that match the email domain of the user in the list of organisations in the organisation selection dropdown. When the selection page is submitted, validate that the selected organisation is in the list of allowed organisations, and if it is not show a validation error. If the feature flag is disabled, the behaviour remains unchanged and we show all organisations in the dropdown.
Update the content to not refer to the mailing list.
If there are 30 or fewer organisations that match the user's email domain, display radio buttons instead of an autocomplete field. Add an option for the user's account not being listed. This commit does not handle this option being selected yet.
When the "The organisation I work for is not listed" radio option is selected, render a static page with content telling the user what to do next. The body content for this page is the same as the content in the details component on the select organisation page when the autocomplete component is shown.
stephencdaly
force-pushed
the
limit-organisation-choice-based-on-email
branch
from
July 24, 2026 14:23
627899f to
a5af35b
Compare
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2963.admin.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
stephencdaly
marked this pull request as ready for review
July 24, 2026 14:39
Contributor
Author
|
@StephenGill could you review the content in this when you get some time? I've included screenshots of the different variations. I haven't implemented the different pages for no matching organisations or only one matching organisation yet, I'll do that in the next PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this pull request solve?
Trello card: https://trello.com/c/LH68oEwk/
Add a
show_relevant_organisations_enabledfeature flag.If it is enabled, limit the organisations shown on the organisation selection page to organisations with domains that match the user's email domain.
This PR does not deal with the cases where there are no matching organisations, a single matching organisation. These will be addressed in follow-up PRs.
When there are 30 or fewer organisations for the user's email domain:
Error message:
When "The organisation I work for is not listed" is selected:
When there are more than 30 organisations for the user's email domain:
When the feature flag is disabled (should be the same behaviour/appearance as it is currently, but with updated content in the details component):
Things to consider when reviewing