Add Secretariat-only endpoints for assigning and removing an
organization’s reports-to relationship with a ROOT organization.
- Add documented POST endpoints to add and remove ROOT `oversees`
relationships.
- Validate that the overseeing organization has ROOT authority and return
clear errors when either organization is not found.
- Reassign a reporting organization atomically by removing it from a
previous ROOT organization before adding the new relationship.
- Audit additions, removals, and reassignments for every affected ROOT
organization.
- Ignore `oversees` in standard organization PUT requests so reports-to
relationships can only be managed through the dedicated endpoints.
- Update existing CRUD coverage to verify PUT requests cannot create
`oversees` or derived `reports_to` relationships.
- Add ROOT organization integration coverage for successful assignment,
reassignment, removal, invalid non-ROOT parents, missing organizations,
and Secretariat-only authorization.
Resolves issue #1933, add dedicated Secretariat endpoints for managing ROOT organization reports-to relationships.
Closes Issue #1933
Summary
Adds a supported, auditable way for Secretariat users to assign and remove an organization’s ROOT reports-to relationship.
Important Changes
src/controller/registry.controller/index.jsoverseesrelationships.src/controller/registry.controller/org.registry.controller.jsoversees.src/repositories/baseOrgRepository.jssrc/controller/registry.controller/org.error.jstest/integration-tests/registry-org/rootOrgTest.jstest/integration-tests/registry-org/registryOrgCRUDTest.jsoverseesor derivedreports_torelationships.Testing
reports_tois returned.reports_tois no longer returned.overseesthrough the standard PUT endpoint.Notes
Relationship management is intentionally restricted to the dedicated Secretariat endpoints; standard organization updates ignore the
overseesfield.