TK-66: Search the Active Directory for the ISA Manager Contact - #69
Merged
burkkyy merged 2 commits intoSep 5, 2026
Conversation
The ISA Manager (secondary contact) field now searches the Yukon Government directory instead of existing app users, so any employee can be named on the contract. The client submits the selected email; the controller resolves it to an internal user (creating one from the directory when missing) and stores its id. Group creation already excludes this contact, so the Manager never gains group admin or membership. See TK-66. See https://yg-hpw.atlassian.net/browse/TK-66
Why? The internalGroupSecondaryContactEmail write-side field spread directory resolution across the ISA controller, policy, and serializer for a value that is not a real column. The ISA endpoints accept internalGroupSecondaryContactId again. The client resolves the selected directory email to an internal user through the new POST /api/users/directory-users endpoint before saving, and prefills the edit form by looking the contact up by id. External users cannot reach the new endpoint, matching who may author an agreement. See https://yg-hpw.atlassian.net/browse/TK-66
burkkyy
marked this pull request as ready for review
September 5, 2026 03:28
burkkyy
deleted the
tk-66/show-users-from-directory-when-searching-for-manager-while-creating-an-isa
branch
September 5, 2026 03:30
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.
Fixes https://yg-hpw.atlassian.net/browse/TK-66
Context
When creating or editing an Information Sharing Agreement, the Manager contact must be searchable from the Active Directory so any Yukon Government employee can be named on the agreement — without being granted access to the agreement's group.
Previously the Manager field only searched existing app users, so employees who had never signed in could not be selected.
Implementation
The agreement endpoints stay id-based; the client resolves the chosen directory email to a user through a dedicated directory-user endpoint, keeping the resolution out of the agreement controller.
Screenshots
Testing Instructions
dev test.dev up.