Skip to content

fix: preserve document sharing and allow own file updates [DHIS2-9191] - #25178

Merged
netroms merged 2 commits into
masterfrom
fix/DHIS2-9191-document-sharing
Sep 19, 2026
Merged

netroms merged 2 commits into
masterfrom
fix/DHIS2-9191-document-sharing

Conversation

@netroms

@netroms netroms commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve imported sharing in document post-create/update hooks.
  • Allow uploaded documents to retain their own assigned file while rejecting another document’s file.
  • Add HTTP regressions for sharing and file ownership.

Refs DHIS2-9191.

PUT replacement semantics are unchanged: Reports must use JSON Patch or skipSharing=true to preserve omitted sharing.

Verification

  • New regressions: 7/10 fail before the fix; all 10 pass afterward.
  • 23 focused controller tests pass, including file-resource and JSON Patch regressions.
  • Local Java 17/PostgreSQL instance: 16 PUT/PATCH comparison cases, sharing at creation, and cross-document file rejection verified.

AI Assisted

@netroms
netroms marked this pull request as draft September 11, 2026 20:15
@sonarqubecloud

Copy link
Copy Markdown

@netroms
netroms marked this pull request as ready for review September 14, 2026 15:16
@netroms
netroms merged commit d21ca01 into master Sep 19, 2026
25 checks passed
@netroms
netroms deleted the fix/DHIS2-9191-document-sharing branch September 19, 2026 14:01
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.

3 participants