[PM-42584] Require single organization to enable fill assist policy - #8266
Conversation
Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR makes Code Review Details
|
Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
| PolicyType.OrganizationUserNotification => "Vault banner message", | ||
| PolicyType.SendControls => "Send controls", | ||
| PolicyType.FillAssist => "Fill Assist", | ||
| PolicyType.FillAssist => "Activate fill assist", |
There was a problem hiding this comment.
FYI: Changing this to be sentence case, and also so the text in the error toast (in clients) matches the policy name.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8266 +/- ##
=========================================
+ Coverage 0 63.32% +63.32%
=========================================
Files 0 2430 +2430
Lines 0 104922 +104922
Branches 0 9505 +9505
=========================================
+ Hits 0 66447 +66447
- Misses 0 36198 +36198
- Partials 0 2277 +2277 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-42584
📔 Objective
Require that an org enable the “Single organization membership” policy before they can enable the “Activate fill assist” policy.
Context
PolicyType.FillAssist (added in PM-41311) can currently be enabled independently of Single organization. Because fill assist rule URLs are org-scoped, admins should not be able to enable Fill assist without Single organization first. Matches the existing prerequisite already enforced for UriMatchDefaults, ResetPassword, and MaximumVaultTimeout.
Change
FillAssistPolicyEventHandler implements IEnforceDependentPoliciesEvent with RequiredPolicies => [PolicyType.SingleOrg]. The SavePolicyCommand framework handles both directions automatically:
Enabling Fill assist while SingleOrg is disabled → 400
Disabling SingleOrg while Fill assist is enabled → 400
Both error messages are generated by the framework from PolicyType.GetName(). No new copy, no localization work.
NOTE: We decided to skip QA for these
serverchanges. We'll do QA in the companion PR inclientsfor https://bitwarden.atlassian.net/browse/PM-42585