Skip to content

Add isSystemUser to DeletionUserInfo#769

Merged
Schmarvinius merged 2 commits intomainfrom
bug/user-info-delegation
Mar 30, 2026
Merged

Add isSystemUser to DeletionUserInfo#769
Schmarvinius merged 2 commits intomainfrom
bug/user-info-delegation

Conversation

@Schmarvinius
Copy link
Copy Markdown
Collaborator

Summary

  • Adds isSystemUser getter/setter to DeletionUserInfo so plugin handlers can distinguish system vs named user deletes
  • Copies UserInfo.isSystemUser() in fillDeletionUserInfo() alongside the existing name
  • Updates unit and integration tests to cover the new field

Closes #764

@hyperspace-insights
Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Add isSystemUser to DeletionUserInfo

New Feature

✨ Adds the isSystemUser field to DeletionUserInfo, allowing plugin handlers (e.g., SDM CAP plugin) to reliably distinguish between system/technical user deletes and named user deletes. Previously, the delete context lacked this information because delete requests routed through the outbox service did not carry UserInfo, forcing workarounds like string-comparing the user name against "system-internal".

Changes

  • DeletionUserInfo.java: Added IS_SYSTEM_USER constant and getIsSystemUser()/setIsSystemUser(Boolean) getter/setter to the interface.
  • AttachmentsServiceImpl.java: Updated fillDeletionUserInfo() to copy userInfo.isSystemUser() into the newly added field on DeletionUserInfo.
  • AttachmentsServiceImplTest.java: Extended mock user info setup to set isSystemUser = true and added assertion that deletionUserInfo.getIsSystemUser() matches the source UserInfo.
  • DeletionUserInfoTest.java: Added test cases covering read/write of the new isSystemUser field via both getter/setter and the IS_SYSTEM_USER constant key.
  • OdataRequestValidationWithTestHandlerTest.java: Extended integration test assertions to verify that getIsSystemUser() returns false for anonymous user delete events.

Jira Issues

Related GitHub issue: #764 — Missing userInfo in deleteContext


  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.19.3 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback


💌 Have ideas or want to contribute? Create an issue and share your thoughts with us!
📑 Check out the documentation for more information.
📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

Made with ❤️ by Hyperspace.

Copy link
Copy Markdown
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks correct and consistent. The getIsSystemUser() returns a boxed Boolean which is appropriate for a CdsData interface (map-backed, can be null). The Boolean.FALSE.equals(...) pattern in the integration test correctly handles the null case. No substantive issues found in the changes.

The PR is a clean, minimal addition — the new isSystemUser field is correctly propagated from UserInfo into DeletionUserInfo, the constant name matches the getter/setter, null-safety is handled appropriately with the boxed Boolean type, and all test layers (unit + integration) are properly updated to cover the new field.

PR Bot Information

Version: 1.19.3 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • LLM: anthropic--claude-4.6-sonnet
  • Event Trigger: pull_request.opened
  • Correlation ID: 2703a6e0-2c07-11f1-9efb-4fae3d730a98

@Schmarvinius Schmarvinius self-assigned this Mar 30, 2026
@Schmarvinius Schmarvinius requested a review from a team March 30, 2026 07:31
Copy link
Copy Markdown
Contributor

@lisajulia lisajulia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Schmarvinius Schmarvinius merged commit 14a1703 into main Mar 30, 2026
12 checks passed
@Schmarvinius Schmarvinius deleted the bug/user-info-delegation branch March 30, 2026 14:29
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.

Missing userInfo in deleteContext

2 participants