Resolves Issue #1791: Require private contacts for registry org creation#1861
Closed
afoote-mitre wants to merge 3 commits into
Closed
Resolves Issue #1791: Require private contacts for registry org creation#1861afoote-mitre wants to merge 3 commits into
afoote-mitre wants to merge 3 commits into
Conversation
Collaborator
|
This PR works when creating using an org on the new "registry" endpoints. However, you can still make an org with the legacy endpoints, then are free to edit it with the "registry" endpoints without the restriction. We need to decide on how / if we want to handle that before merging. |
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 #1791
Summary
Requires two private contacts when creating a registry organization.
Org creation now enforces the policy that new registry orgs must include at least two
private_contacts, while leaving existing org update validation unchanged. This applies to both registry org creation paths and returns a standard validation error when fewer than two private contacts are provided.Important Changes
src/repositories/baseOrgRepository.jsprivate_contacts.src/controller/org.controller/org.controller.jssrc/controller/registry-org.controller/registry-org.controller.jsschemas/registry-org/create-registry-org-request.jsonprivate_contacts.minItems: 2for create requests.src/controller/org.controller/index.jstest/integration-tests/**Testing
Steps to manually test updated functionality:
bash -i -c "npm run test:integration".POST /api/registry/orgwith zero or one private contact returns400.POST /api/registry/orgwith two private contacts succeeds.