Skip to content

Resolves Issue #1840: Fix user dual-write normalization#1852

Open
afoote-mitre wants to merge 1 commit into
devfrom
af-1840
Open

Resolves Issue #1840: Fix user dual-write normalization#1852
afoote-mitre wants to merge 1 commit into
devfrom
af-1840

Conversation

@afoote-mitre

@afoote-mitre afoote-mitre commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Closes Issue #1840

Summary

Fixes user dual-write creation so legacy dotted-key payloads are normalized before syncing data into the Registry user collection.

Important Changes

src/repositories/baseUserRepository.js

  • Converts legacy create payloads from the saved User document instead of the raw request body.
  • Preserves admin role detection from role and authority.active_roles.

test/integration-tests/org/postOrgUsersTest.js

  • Added regression coverage for "name.first" dotted-key legacy payloads syncing into BaseUser.
  • Added coverage for registry user creation with authority.active_roles: ["Admin"].

test/integration-tests/review-object/reviewObjectTest.js

  • Added diagnostic assertion output for review-history conversation setup failures.

Testing

Steps to manually test updated functionality, if possible

  • 1) Run bash -i -c "npm run test:integration".
  • 2) Create a legacy user with "name.first" and verify both User and BaseUser contain name.first.
  • 3) Create a registry user with authority.active_roles: ["Admin"] and verify the user UUID is in the org admins list.

@afoote-mitre afoote-mitre changed the title Fix user dual-write normalization Resolves Issue #1840: Fix user dual-write normalization Jun 10, 2026
@afoote-mitre afoote-mitre requested a review from david-rocca June 10, 2026 19:40
@afoote-mitre afoote-mitre self-assigned this Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant