Resolves issue #1423, Add registry user expansion tests and update coverage#1838
Open
afoote-mitre wants to merge 1 commit into
Open
Resolves issue #1423, Add registry user expansion tests and update coverage#1838afoote-mitre wants to merge 1 commit into
afoote-mitre wants to merge 1 commit into
Conversation
jdalphond-mitre
left a comment
Collaborator
There was a problem hiding this comment.
I have tested this and it correctly does not return secretariat users as an org admin.
It does return the secretariat users as a secretariat.
Collaborator
Author
This comment was left on the wrong ticket, @jdalphond-mitre has not yet reviewed this one |
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 #1423
Summary
Adds registry user expansion/update support and expands unit and integration coverage around registry org/user behavior, user membership fields, and shared utility helpers.
During test development, several implementation gaps were found and fixed. The public registry user request/response schemas exposed
org_affiliationsandcve_program_org_membership, but the internalBaseUser.jsonvalidator did not allow those fields andbaseuser.jsdid not persist them. Also, registry user update flows could fail when clients sent back a fetched user object becauseregistry-user.controller.jsvalidated server-managed timestamp fields before stripping them. These gaps caused valid registry user updates to return400; the implementation now aligns validation, persistence, and update handling with the documented registry user shape.Important Changes
src/controller/registry-user.controller/registry-user.controller.jsschemas/registry-user/BaseUser.jsonorg_affiliationsandcve_program_org_membership.src/model/baseuser.jssrc/controller/user.controller/error.jstest/integration-tests/org_affiliationsandcve_program_org_membership.test/unit-tests/Testing
Steps to manually test updated functionality, if possible
NODE_ENV=test node node_modules/mocha/bin/mocha test/unit-tests --recursive --exit.NODE_ENV=test node node_modules/mocha/bin/mocha test/integration-tests/registry-user test/integration-tests/user --recursive --exit.GET /api/registry/org/{short_name}?expand=usersreturns_userMapwhen the expansion implementation is present./api/registryUser/{UUID}.org_affiliationsandcve_program_org_membershipand confirm both fields persist.