Commit Graph

7053 Commits

Author SHA1 Message Date
Micaiah Martin
559452ec13 Fix SQLite bulk copy failure for cipher imports 2026-04-08 14:53:42 -06:00
Micaiah Martin
1a74cd29f1 Fix SQLite bulk copy failure for org accounts 2026-04-08 14:29:39 -06:00
Patrick-Pimentel-Bitwarden
7c4fa752c7 fix(change-email): [PM-34742] Change Email Sets Salt (#7422)
* 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.
2026-04-08 17:26:39 +00:00
Jordan Aasen
49e08254a2 add feature flag (#7412) 2026-04-08 09:27:44 -07:00
Jared
ea32fd1642 refactor(UsersController): Remove unused feature service and simplify revoke user logic (#7397)
* 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.
2026-04-08 11:21:08 -04:00
Patrick-Pimentel-Bitwarden
fc0ce255af Revert "fix(change-email): [PM-34742] Change Email Sets Salt (#7413)" (#7421)
This reverts commit 13eecfd605.
2026-04-08 11:05:57 -04:00
Patrick-Pimentel-Bitwarden
74c4aced74 fix(refactor): [PM-34246] Rename Set Password to Finalize Onboarding (#7328)
* 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.
2026-04-08 11:00:17 -04:00
Jared McCannon
eb251d9bf8 Removing not scim check from api-key and rotate-api-key (#7403) 2026-04-08 09:58:58 -05:00
Alex Morask
a5052d8d0f fix(billing): skip ended schedule phases when updating storage (#7420) 2026-04-08 09:51:03 -05:00
sven-bitwarden
54023cac9a [PM-33213] Remove FeatureFlag Around ResetPassword && PolicyRequirements (#7188)
* 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
2026-04-08 09:44:55 -05:00
Jared McCannon
076032954c Adding feature flag (#7401) 2026-04-08 09:20:06 -05:00
Graham Walker
f6e858b296 PM-34686 initial commmit (#7398) 2026-04-08 07:43:05 -05:00
Patrick Honkonen
fdb4bb4630 [PM-34171] Add mobile card scanner feature flag (#7310) 2026-04-08 08:31:19 -04:00
Patrick-Pimentel-Bitwarden
13eecfd605 fix(change-email): [PM-34742] Change Email Sets Salt (#7413)
* 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
2026-04-07 18:47:19 -04:00
Jordan Aasen
d038dfa261 [PM-33500] - delete attachments from deleted ciphers (#7208)
* delete attachments from deleted ciphers

* add DeleteAttachmentsForOrganizationAsync to cipher service. update specs

* fix test

* only grab cipherId for attachments deletion

* add missing directive

---------

Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2026-04-07 21:12:59 +00:00
Alex Morask
aa1aa58190 fix(billing): use top-level ProrationBehavior on schedule updates for immediate storage invoicing (#7410) 2026-04-07 15:09:21 -05:00
renovate[bot]
13a9866cdb [deps] Billing: Update Kralizek.AutoFixture.Extensions.MockHttp to 2.2.1 (#6556)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-07 15:08:49 -05:00
Vijay Oommen
226828f296 PM-34391 fixes to eventsController (#7405) 2026-04-07 13:43:54 -05:00
Rui Tomé
cc596d8ad7 [PM-34177] Fix feature flag key value for Organization Invite Links (#7409)
* [PM-34177] Fix feature flag key value for Organization Invite Links

* Rename feature flag key for Organization Invite Links to Generate Invite Link
2026-04-07 19:21:19 +01:00
Alex Morask
c04ee9c0a9 fix(billing): handle cross-product Phase 2 price overlay for Families 2019 (#7408) 2026-04-07 12:32:51 -05:00
Rui Tomé
1ece1145e3 [PM-34177] Add feature flag for Organization Invite Links (#7404) 2026-04-07 18:12:28 +01:00
adudek-bw
3fb16705c3 Add SDK Sends API feature flag (#7254) 2026-04-07 11:36:34 -04:00
renovate[bot]
4bed21d1ea [deps] Billing: Update swashbuckle-aspnetcore monorepo to 10.1.7 (#7008)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-07 09:38:14 -05:00
Rui Tomé
c277637312 [PM-29152] Rename VNextSavePolicyCommand to SavePolicyCommand and remove deprecated policy interfaces (#7364)
* 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
2026-04-07 13:03:13 +01:00
Vijay Oommen
8d00c2bb45 PM-34230 server side constant for feature flag (#7395) 2026-04-06 16:36:01 -05:00
Thomas Rittson
963c160999 [PM-34595] Add provider authorization attributes (#7389)
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
2026-04-07 07:34:03 +10:00
Alex Morask
e758ca2e27 fix(billing): display Phase 2 prices and discount on org subscription page (#7393) 2026-04-06 14:15:20 -05:00
gitclonebrian
eb3700afcc moved image tag max length logic out of conditional block. now applies in all scenarios (#7396) 2026-04-06 18:51:02 +00:00
Daniel James Smith
2c9be6fa4c [PM-34456] Innovation Sprint: Enable generating automated release notes (#7362)
* Enable generating automated release notes

* Update release.yml template

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2026-04-06 20:08:24 +02:00
Brandon Treston
ecac34bc18 [PM-22525] Log when provider admin accesses an org vault (#7379)
* log when provider admin accesses an org vault

* cleanup whitespace

* more whitespace clean up
2026-04-06 12:17:30 -04:00
Github Actions
0a15a68c63 Bumped version to 2026.4.0 2026-04-06 15:56:58 +00:00
Alex Morask
c4f9ad79a9 fix(billing): prevent stale schedule discount after Stripe deletion (#7391) 2026-04-06 10:54:28 -05:00
Dave
93604aae8f fix(emergency-access): [PM-33788] EF Emergency Access Query Updates
* feat(emergency-access) [PM-33788] Update expired recoveries query.

* feat(emergency-access) [PM-33788] Update many to notify query.

* test(emergency-access) [PM-33788] Update integration tests for recovery time.
2026-04-05 14:43:13 -04:00
Nik Gilmore
2b7ba20487 [PM-28190] Add pm-28190-cipher-sharing-ops-to-sdk Feature Flag (#6887) 2026-04-03 10:44:46 -07:00
Conner Turnbull
6eb0c3c3ef Include schedule Phase 2 discount in premium tax estimate preview (#7385)
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.
2026-04-03 10:41:33 -04:00
Matt Gibson
5596ffce0d [pm-34486] require basic auth on seeder api endpoints (#7368)
* [pm-34486] require basic auth on seeder api endpoints

* Fixup tests with basic auth
2026-04-03 07:22:23 +02:00
renovate[bot]
0cb7417824 [deps]: Update prettier to v3.8.1 (#6702)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vicki League <vleague@bitwarden.com>
2026-04-02 14:41:42 -04:00
Stephon Brown
6ab70c1d99 [PM-34570] Expired or Cancelled Claimed User Throws Billing Exception on Subscription Cancel (#7382)
* fix(billing): broaden exception handling for subscription cancellations

* test(billing): add BillingException handling tests for user account deletion

* test(billing): add BillingException handling tests for organization deletion

* refactor(test): remove unused ILogger using statement

* refactor(billing): add specific usings for billing exceptions

* fix(billing): specify exceptions for billing cancellation failures
2026-04-02 14:21:51 -04:00
Conner Turnbull
7feb6ced39 [PM-29956] Add logging to sponsorship redemption flow (#7381) 2026-04-02 14:17:29 -04:00
John Harrington
44b818acc6 [PM-3836] Tools - Make Controllers, Services and API Models nullable (#7212)
* enable nullable on AzureSendFileStorageService

* LocalSendStorageService nullable

* revert primary constructor and begin updating some models

* SendRequestModel > nullable

* SendAccessResponseModel SendFileDownloadDataResponseModel SendFileUploadDataResponseModel > nullable

* SendResponseModel SendFileModel SendTextModel > nullable

* ImportCiphersController > nullable
2026-04-02 10:15:18 -07:00
Alex Morask
69672bf912 fix(billing): scope schedule discount to seats item instead of cart (#7378) 2026-04-02 14:32:22 +00:00
Conner Turnbull
2b49ddb900 [PM-31905] Remove m2 flag definition (#7353)
* 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
2026-04-02 09:06:57 -05:00
Stephon Brown
da34581991 [PM-33897] Schedule Aware Cancellation and Reinstatement (#7374)
* feat(pricing): add ResolvePhase2Async to price increase scheduler interface

* feat(pricing): implement ResolvePhase2Async and add unit tests

* feat(subscriber): adjust subscription cancellation for price migration schedules

* feat(reinstate): update subscription reinstatement for price migration schedules

* fix(billing) simplify cancellation data logic

* fix(billing): Cast StartDate to DateTime in price increase tests

* fix(billing): PR feedback

* refactor(test): rename subscription cancellation test

* fix(billing): properly apply cancellation metadata to subscription schedules
2026-04-02 10:04:41 -04:00
Thomas Rittson
0918bfdda6 Add checks and tests to provider controllers (#7372) 2026-04-02 09:05:19 +10:00
Alex Morask
1fac799e3d fix(billing): display schedule phase 2 discount on premium subscription page (#7375) 2026-04-01 14:53:45 -05:00
Conner Turnbull
aced3762fa [PM-31902] Remove m2 flagged logic (#7351)
* 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.
2026-04-01 18:05:26 +00:00
renovate[bot]
4934c413b7 [deps]: Update dorny/test-reporter action to v3 (#7347)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-01 11:12:16 -05:00
John Harrington
7e02832672 [PM-31885] Consolidate all Send policies to a single policy (#7113)
* 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>
2026-04-01 08:03:46 -07:00
Brandon Treston
2465e3a4fe add repo call to check if existing collection already has access setup (#7365) 2026-04-01 10:03:08 -04:00
Nick Krantz
4408782fce remove Archive feature flag usage (#7371) 2026-04-01 10:01:03 -04:00