* fix(change-email): [PM-34742] Change Email Sets Salt (#7422) - Fixed email and salt being able to be separated. Added test to confirm rollback on stripe failure.
* Removed references to IFeatureService and IRevokeOrganizationUserCommand from UsersController.
* Simplified the logic for revoking users by directly using IRevokeOrganizationUserCommandV2.
* Updated unit tests to reflect the removal of feature flag checks for SCIM revoke functionality.
* fix(refactor): [PM-34246] Rename Set Password to Finalize Onboarding - Initial set of renames take two.
* fix(refactor): [PM-34246] Rename Set Password to Finalize Onboarding - Updated function name.
* fix(refactor): [PM-34246] Rename Set Password to Finalize Onboarding - Fixed test.
* fix(refactor): [PM-34246] Rename Set Password to Finalize Onboarding - Unborked tests.
* fix(refactor): [PM-34246] Rename Set Password to Finalize Onboarding - Changed test names.
* Remove policy requirement feature flags around ResetPassword policyˆ
* Remove unused elements
* Remove unused elements
* Remove more unused elements
* More unused elements!
* remove policy requirement for organizationscontroller
* Fix test to revert to PolicyQuery
* Remove unused code
* Restore PolicyQuery for OrganizationService
* Add TODOs indicating why we are staying on policyquery
* fix(change-email): [PM-34742] Change Email Sets Salt - Fixed prelogin to respond back with salt data coming from database.
* fix(change-email): [PM-34742] Change Email Sets Salt - Fixed change email.
* test(change-email): [PM-34742] Change Email Sets Salt - Updated and added more tests
* Remove deprecated ISavePolicyCommand interface and SavePolicyCommand implementation along with associated tests
* Refactor policy validation: remove IPolicyValidator interface and related implementations. Update PolicyServiceCollectionExtensions to eliminate deprecated methods. Adjust policy validator classes to remove IPolicyValidator dependency and streamline validation methods.
* Remove IPostSavePolicySideEffect interface and its implementation from the policy validation framework.
* Rename VNextSavePolicyCommand to SavePolicyCommand
* Continue renaming VNextSavePolicyCommand
* Refactor policy validation tests to use SavePolicyModel in ValidateAsync and side effect methods
* Refactor policy validators to directly use PolicyUpdate from SavePolicyModel in validation and side effect methods, improving code clarity and reducing method complexity.
* Rename test methods in PoliciesControllerTests and VerifyOrganizationDomainCommandTests to better reflect their functionality, enhancing clarity and consistency across the test suite.
* Refactor OrganizationUserNotificationPolicyValidator by removing unused methods and simplifying the implementation. Update corresponding tests to reflect these changes.
* Remove unnecessary nullable enable directives from policy validator files and update using statements for consistency.
* Rename policy validators to handlers
* dotnet format
Introduces declarative authorization pattern for Provider-based endpoints
following the same approach as the existing Organization authorization
infrastructure. No production code behavior changes — handler and
requirements are registered but not yet wired to any controllers.
New:
- IProviderRequirement: base interface for provider authorization requirements
- ProviderRequirementHandler: central handler that resolves provider claims
from route/context and delegates to requirement implementations
- ProviderClaimsExtensions: helpers to parse provider membership from claims
- ProviderAdminRequirement, ProviderUserRequirement, ManageProviderUsersRequirement
- HttpContextExtensions.GetProviderId(): route param helper (mirrors GetOrganizationId)
- DI registration for ProviderRequirementHandler
- Unit tests for all new types
When a subscription has an active schedule during the ~15-day window before
renewal, the invoice preview for tax estimation was built with the new price
but without the Phase 2 discount coupon. This caused the estimated tax on the
subscription page to be higher than what Stripe would actually charge.
Pass the coupon ID from the schedule's Phase 2 discount through to
EstimatePremiumTaxAsync so it is included in the InvoiceCreatePreviewOptions.
* Remove pm-23341-milestone-2 flag from UpcomingInvoiceHandler.HandleForUserAsync
Always call AlignPremiumUsersSubscriptionConcernsAsync instead of gating
it behind the feature flag.
* Remove pm-23341-milestone-2 flag from AccountsController and SubscriptionResponseModel
Remove includeMilestone2Discount parameter from both SubscriptionResponseModel
constructors. Rename ShouldIncludeMilestone2Discount to ShouldIncludeDiscount
and always evaluate the discount (coupon ID match + active check).
* Update AccountsControllerTests after pm-23341-milestone-2 removal
Remove feature flag mock setup lines and delete test methods that
verified flag-disabled behavior. Rename tests to remove flag references.
* Update SubscriptionResponseModelTests after pm-23341-milestone-2 removal
Remove includeMilestone2Discount parameter from all constructor calls.
Delete tests that verified flag-disabled behavior.
* Update UpcomingInvoiceHandlerTests after pm-23341-milestone-2 removal
Remove all feature flag mock setup lines for PM23341_Milestone_2.
* Remove IFeatureService from AccountsController constructor and tests
The constructor parameter became unused after removing the flag check.
* Add default ListPremiumPlans mock for UpcomingInvoiceHandler tests
After removing the m2 flag guard, AlignPremiumUsersSubscriptionConcernsAsync
is always called and needs ListPremiumPlans to return a non-null value.
Add a default empty list in the test constructor setup.
* Remove PM23341_Milestone_2 flag definition from FeatureFlagKeys
* Remove pm-23341-milestone-2 flag from UpcomingInvoiceHandler.HandleForUserAsync
Always call AlignPremiumUsersSubscriptionConcernsAsync instead of gating
it behind the feature flag.
* Remove pm-23341-milestone-2 flag from AccountsController and SubscriptionResponseModel
Remove includeMilestone2Discount parameter from both SubscriptionResponseModel
constructors. Rename ShouldIncludeMilestone2Discount to ShouldIncludeDiscount
and always evaluate the discount (coupon ID match + active check).
* Update AccountsControllerTests after pm-23341-milestone-2 removal
Remove feature flag mock setup lines and delete test methods that
verified flag-disabled behavior. Rename tests to remove flag references.
* Update SubscriptionResponseModelTests after pm-23341-milestone-2 removal
Remove includeMilestone2Discount parameter from all constructor calls.
Delete tests that verified flag-disabled behavior.
* Update UpcomingInvoiceHandlerTests after pm-23341-milestone-2 removal
Remove all feature flag mock setup lines for PM23341_Milestone_2.
* Remove IFeatureService from AccountsController constructor and tests
The constructor parameter became unused after removing the flag check.
* Add default ListPremiumPlans mock for UpcomingInvoiceHandler tests
After removing the m2 flag guard, AlignPremiumUsersSubscriptionConcernsAsync
is always called and needs ListPremiumPlans to return a non-null value.
Add a default empty list in the test constructor setup.
* initial send controls
* update vNext methods and add test coverage for policy validators
* add comments to tests
* Apply suggestion from @mkincaid-bw
• `IX_Policy_OrganizationId_Type` is a unique index
Co-authored-by: mkincaid-bw <mkincaid@bitwarden.com>
* renamne migrations for correct sorting
* respond to csharp related review comments
* fix failing lints
* fix tests
* revise policy sync logic
* revise policy event logic and tests
* add integration tests
- fix SQL syntax error
- escape Sqlite format specifier
- update migration IDs to match sorted filename
- fix SQL syntax error
* OR legacy policy data with SendControls policy data
* remove migrations and associated integration test
* whitespacing and comment correction
* aggregate kegacy Send policies in PolicyQuery and adjust PoliciesController logic
* add comments to simplify post-migration cleanup
* consolidate legacy Send policy synthesis from PoliciesController into PolicyQuery.GetAllAsync
* respond to review comments and other minor fixes
---------
Co-authored-by: mkincaid-bw <mkincaid@bitwarden.com>