dd-sdk-ios
dd-sdk-ios copied to clipboard
RUM-6284 Implement Overrides Logic
What and why?
This PR builds on the work from #2058, which introduced Fine-Grained Masking (FGM) overrides (see the RFC [internal] for more details). It implements the logic for applying the text and input privacy override, as well as image privacy override, at the view level. The goal is to allow views to have a specific privacy setting that overrides the global configuration.
Additionally, it ensures that privacy overrides propagate to child views, allowing parents to enforce privacy settings for their entire subtree, unless explicitly overridden by child views.
How?
- Updated recorders that handle text and user inputs, as well as images (e.g.,
UILabelRecorder,UIPickerViewRecorder,UIImageViewRecorder) to incorporate privacy overrides logic. - Modified these recorders to take into account the view's attributes in addition the context to determine the appropriate behavior.
- Implemented logic to resolve the effective privacy level at each view, ensuring that:
- view-level overrides take precedence over global settings
- child views inherit privacy settings from their parent, unless explicitly set their own overrides
- Renamed
SessionReplayOverrideExtensiontoSessionReplayOverridesto improve clarity
Review checklist
- [x] Feature or bugfix MUST have appropriate tests (unit, integration)
- [x] Make sure each commit and the PR mention the Issue number or JIRA reference
- [ ] Add CHANGELOG entry for user facing changes