[PM-40139] feat: Consolidate Disable Send and Send Options into Send Controls policy#2877
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the consolidation of the legacy Disable Send (type 6) and Send Options (type 7) policies into the new Send Controls policy (type 21) behind the Code Review DetailsNo findings. The change is well-scoped and the test coverage is thorough — both flag-on and flag-off branches are exercised for send-disabled and hide-email-disabled paths, including no-data, no-policies, and cross-policy-ignore cases. Backward compatibility with the legacy policies is preserved when the flag is off. Note: this PR targets the stacked base branch |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## matt/PM-40133-send-controls-policy #2877 +/- ##
======================================================================
+ Coverage 78.98% 81.26% +2.28%
======================================================================
Files 1150 1027 -123
Lines 73426 66143 -7283
======================================================================
- Hits 57993 53753 -4240
+ Misses 15433 12390 -3043 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
PM-40139
📔 Objective
Note
Depends on #2868
Consolidates the two existing Send policies (Disable Send and Send Options) into the new Send Controls policy.
pm-31885-send-controlsfeature flag, completing the enforcement work deferred by PM-38792 (which added the policy type, SDK mapping, and flag plumbing).sendControlsorg policy (type 21) data —data["disableSend"]anddata["disableHideEmail"]. When off, the app keeps respecting the legacydisableSend(type 6, presence-based) andsendOptions(type 7,disableHideEmail) policies unchanged.PolicyOptionType.disableSend; centralizes the flag branch inPolicyService(isSendDisabledByPolicy()new,isSendHideEmailDisabledByPolicy()updated) so the four UI-layer call sites (AddEditSendItemProcessor,SendListProcessor,TabCoordinator×2) stay thin service calls with no flag logic.