Skip to content

[backend/frontend] User deletion and Public sharing - Chunk D (#14918)#15314

Open
ludovic wants to merge 6 commits intofeat/public-data-sharing-chunk-cfrom
feat/public-data-sharing-chunk-d
Open

[backend/frontend] User deletion and Public sharing - Chunk D (#14918)#15314
ludovic wants to merge 6 commits intofeat/public-data-sharing-chunk-cfrom
feat/public-data-sharing-chunk-d

Conversation

@ludovic
Copy link
Copy Markdown
Member

@ludovic ludovic commented Apr 1, 2026

Proposed changes

*This chunk handles cleaning up public configs when a user is deleted and fixes UX issues in the edition forms.

Backend

  • Cleanup on user deletion: Added disablePublicSharingForDeletedUser inside userDelete. It automatically sets *_public = false (and stream_live = false) on any Feed, TAXII, or Stream using the deleted user, and clears *_public_user_id.
  • Fix "System" UI display: *_public_user resolvers now properly return null instead of falling back to SYSTEM_USER when *_public_user_id is empty.
  • Edition validation: Backend now strictly rejects passing *_public = true during fieldPatch mutations if no *_public_user_id is defined.

Frontend

  • Controlled Public Switch: Stream and TAXII edition forms now use controlled Formik state for the public switch.
  • Batched Save on Enable: Toggling public ON merely shows the user selector. Selecting a user then triggers a single mutation sending both *_public_user_id and *_public = true.
  • Immediate Save on Disable: Toggling OFF disables public sharing immediately.
  • Delete Warning: Added an alert in UserDeletionDialog.tsx warning that associated public feeds and streams will be disabled.

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

@ludovic ludovic self-assigned this Apr 1, 2026
@ludovic ludovic linked an issue Apr 1, 2026 that may be closed by this pull request
@ludovic ludovic added the filigran team use to identify PR from the Filigran team label Apr 1, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 58.33333% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.77%. Comparing base (dfc3754) to head (b5a2439).

Files with missing lines Patch % Lines
...components/data/stream/StreamCollectionEdition.tsx 0.00% 12 Missing ⚠️
...e/components/data/taxii/TaxiiCollectionEdition.tsx 0.00% 12 Missing ⚠️
...src/modules/dataSharing/streamCollection-domain.ts 37.50% 5 Missing ⚠️
.../src/modules/dataSharing/taxiiCollection-domain.ts 37.50% 5 Missing ⚠️
...aphql/src/modules/dataSharing/dataSharing-utils.ts 97.43% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##           feat/public-data-sharing-chunk-c   #15314   +/-   ##
=================================================================
  Coverage                             32.76%   32.77%           
=================================================================
  Files                                  3151     3151           
  Lines                                214042   214114   +72     
  Branches                              38966    38980   +14     
=================================================================
+ Hits                                  70129    70171   +42     
- Misses                               143913   143943   +30     
Flag Coverage Δ
opencti-client-python 45.59% <ø> (ø)
opencti-front 2.86% <0.00%> (-0.01%) ⬇️
opencti-graphql 68.16% <81.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ludovic ludovic force-pushed the feat/public-data-sharing-chunk-d branch from 7a0695d to efdbf39 Compare April 2, 2026 13:38
@ludovic ludovic force-pushed the feat/public-data-sharing-chunk-c branch from 3978c80 to dfc3754 Compare April 2, 2026 13:49
@ludovic ludovic force-pushed the feat/public-data-sharing-chunk-d branch from efdbf39 to c15e988 Compare April 2, 2026 13:50
@ludovic ludovic marked this pull request as ready for review April 3, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve data sharing in public mode

1 participant