Resolves issue #1699, Fix registry user lookups by user UUID.#1811
Merged
Conversation
cberger8
approved these changes
May 20, 2026
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.
Closes Issue #1699
Summary
Fixes a bug in the registry-user controller where using a user UUID (
identifier) for theGETandPUTendpoints failed. The system incorrectly attempted to lookup the user's UUID by passing it as a username, and incorrectly attempted to lookup the user's organization by passing the user's UUID as an Org UUID. The fix properly queries the organization's users array to map the user to their respective organization and updates the user lookup function to search by UUID.Important Changes
src/repositories/baseOrgRepository.jsgetOrgUUIDByUserUUIDto retrieve an organization's UUID by searching for the user's UUID within itsusersarray.src/controller/registry-user.controller/registry-user.controller.jsgetUser: Replaced buggy user and org lookup logic withfindUserByUUIDand the newly addedgetOrgUUIDByUserUUIDwhen anidentifieris provided.updateUser: Applied the same fix to correctly load theuserToEditandorgrecords, mitigating missing parameter failures.Testing
Steps to manually test updated functionality, if possible
identifier).GET /api/registryUser/:identifierusing the user's UUID and verify it returns a 200 response with correct data.PUT /api/registryUser/:identifierusing the user's UUID to update a field (e.g.,name.first) and confirm the update succeeds.npm run test:integrationcommand to confirm all existing integration tests pass cleanly.Notes
getOrgUUIDByUserUUIDcorrectly maps one user to one org. Eventually, when a user can be in more than one org, this approach will need to be revised.