Skip to content

Resolves #1853 and #1854: Fix organization audit payload UUID logging#1858

Merged
jdaigneau5 merged 3 commits into
devfrom
af-1853
Jun 12, 2026
Merged

Resolves #1853 and #1854: Fix organization audit payload UUID logging#1858
jdaigneau5 merged 3 commits into
devfrom
af-1853

Conversation

@afoote-mitre

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

Copy link
Copy Markdown
Collaborator

Closes Issue #1853, #1854, #1855

Summary

This MR fixes organization audit log payloads so successful org update/delete actions emit the expected structured payload and use the UUID of the organization being acted on.

Important Changes

src/controller/org.controller/org.controller.js

  • Keeps the legacy org update audit payload in scope after the transaction.
  • Logs logger.info(JSON.stringify(payload)) before returning the success response.
  • Uses the already-resolved requestingUserUUID for payload.user_UUID.

src/controller/registry-org.controller/registry-org.controller.js

  • Updates both update_registry_org payload branches to use updatedOrg.UUID for org_UUID.
  • Captures the target org UUID before registry org deletion and logs that UUID in delete_registry_org.

test/unit-tests/org/orgUpdateTest.js

  • Adds unit coverage confirming successful legacy org updates log the update_org payload.
  • Verifies the payload uses the requester UUID instead of performing a second lookup by org UUID.

test/unit-tests/registry-org/registryOrgPayloadTest.js

  • Adds unit coverage for normal registry org update payload logging.
  • Adds coverage for registry org update payload logging when joint approval is required.
  • Adds coverage for registry org delete payload logging.

Testing

Steps to manually test updated functionality, if possible

  • 1) Run bash -i -c "npm run test:unit-tests".
  • 2) Run bash -i -c "npm run test:integration".

@afoote-mitre afoote-mitre self-assigned this Jun 12, 2026
@afoote-mitre afoote-mitre changed the title Resolves #1853: Log org update audit payload Resolves #1853 and #1854: Log org update audit payload Jun 12, 2026
@afoote-mitre afoote-mitre changed the title Resolves #1853 and #1854: Log org update audit payload Resolves #1853 and #1854: Fix organization audit payload UUID logging Jun 12, 2026
@jdaigneau5 jdaigneau5 merged commit 007f895 into dev Jun 12, 2026
9 checks passed
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.

2 participants