1
0
mirror of https://github.com/bitwarden/server synced 2025-12-06 00:03:34 +00:00
Commit Graph

6406 Commits

Author SHA1 Message Date
Kyle Denney
5c1d586a25 [PM-28370] fix defect for self-hosted metadata (#6593)
* [PM-28370] fix defect for self-hosted metadata

* dotnet format
2025-11-18 15:24:34 -06:00
Vince Grassia
2b926ef1c5 BRE-1355 - Rename Bitwarden Unified to Bitwarden Lite (#6592) 2025-11-18 12:24:01 -05:00
Nik Gilmore
a724c933dc [PM-28285] Bugfix: Fix attachment uploads on selfhosted instances (#6590)
* [PM-28285] Remove check for LastKnownRevisionDate when uploading attachment file directly.

Remove accidental commit files

* Remove tests that are no longer relevant

* Remove unecessary lastKnownRevisionDate check from attachment share operation
2025-11-18 07:44:40 -08:00
Kyle Denney
75d8250f3a [PM-24298] milestone3 families 2025 (#6586)
* [PM-24298] milestone3 families2025

# Conflicts:
#	src/Billing/Services/Implementations/UpcomingInvoiceHandler.cs
#	test/Billing.Test/Services/UpcomingInvoiceHandlerTests.cs

* update test name
2025-11-17 16:03:35 -06:00
John Harrington
f52a630197 PM-27248 [Defect] An unhandled error is returned when a MSP tries to import data (#6563)
* Revert previous commits and implement logic to avoid null references:

• reverted previous commits and force pushed to remove inconsistent formatting
• implemented logic to avoid null reference access (with comments)

* fix typo in comment

* fix logical error and add test coverage

* extracted logic common to all code paths per review comment
2025-11-17 13:40:30 -07:00
rr-bw
c2075781ca feat(marketing-initiated-premium): Auth [PM-27551] Create feature flag (#6581)
Create a `"pm-26140-marketing-initiated-premium-flow"` feature flag in `Constants.cs`
2025-11-17 11:25:22 -08:00
Github Actions
902fcb3704 Bumped version to 2025.11.1 2025-11-17 19:06:29 +00:00
Kyle Denney
a9bb01031a remove hardcoded storage values (#6571) 2025-11-17 11:16:02 -06:00
Alex Morask
c620ec2aca [PM-28250] Fix seat add on defect (#6580)
* Handle seat add on

* Remove old price instead
2025-11-17 10:50:10 -06:00
cd-bitwarden
1274fe6562 [SM-1575] Add ability to retrieve events based on projectId/SecretId (#6316)
* adding event filters

* allow user to see deleted secret event logs through public api

* nullable changes to event controller

* fixing tests

* fixing permissions issues with public API

* fix for bug

* Update src/Api/AdminConsole/Public/Controllers/EventsController.cs

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Update src/Api/AdminConsole/Public/Controllers/EventsController.cs

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2025-11-14 18:21:48 -05:00
Patrick-Pimentel-Bitwarden
7eaca9bb7d Revert "feat(prelogin): [Auth/PM-27062] Prelogin New Response (#6577)" (#6582)
This reverts commit 92e511284b.

Merged without feature flag code and before QA could get their review done.
2025-11-14 21:42:14 +00:00
Patrick-Pimentel-Bitwarden
92e511284b feat(prelogin): [Auth/PM-27062] Prelogin New Response (#6577)
* feat(prelogin): [PM-27062] Prelogin New Response - Initial changes to support new data coming back from prelogin.

* test(prelogin): [PM-27062] Prelogin New Response - Added tests.
2025-11-14 19:33:31 +00:00
Brant DeBow
b4c7ab8773 Add FusionCache to service collection (#6575)
* Add FusionCache to service collection

* Refactored to it's own service collection extension, added full unit tests, added TryAdd style support

* Move to ExtendedCache instead of FusionCache, re-use exsting DistributedCache if present, expose backplane to DI

* Reworked builders to reuse multiplexer if present
2025-11-14 12:45:45 -05:00
Ike
9b3adf0ddc [PM-21741] Welcome email updates (#6479)
feat(PM-21741): implement MJML welcome email templates with feature flag support

- Add MJML templates for individual, family, and organization welcome emails
- Track *.hbs artifacts from MJML build
- Implement feature flag for gradual rollout of new email templates
- Update RegisterUserCommand and HandlebarsMailService to support new templates
- Add text versions and sanitization for all welcome emails
- Fetch organization data from database for welcome emails
- Add comprehensive test coverage for registration flow

Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
2025-11-14 07:46:33 -05:00
Stephon Brown
30ff175f8e Milestone 2 Handler Update (#6564)
* fix(billing): update discount id

* test(billing) update test
2025-11-13 17:47:06 +00:00
Jared McCannon
e7b4837be9 [PM-26377] Add Auto Confirm Policy (#6552)
* First pass at adding Automatic User Confirmation Policy.
* Adding edge case tests. Adding side effect of updating organization feature. Removing account recovery restriction from validation.
* Added implementation for the vnext save
* Added documentation to different event types with remarks. Updated IPolicyValidator xml docs.
2025-11-13 11:33:24 -06:00
Alex Morask
59a64af345 [PM-26435] Milestone 3 / F19R (#6574)
* Re-organize UpcomingInvoiceHandler for readability

* Milestone 3 renewal

* Map premium access data from additonal data in pricing

* Feedback

* Fix test
2025-11-13 09:09:01 -06:00
Mick Letofsky
de4955a875 [PM-27181] - Grant additional permissions for review code (#6576) 2025-11-13 14:06:26 +00:00
Vince Grassia
a03994d16a Update build workflow (#6572) 2025-11-13 13:52:26 +01:00
renovate[bot]
0311807951 [deps]: Update actions/upload-artifact action to v5 (#6558)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
2025-11-13 11:31:52 +01:00
SmithThe4th
a836ada6a7 [PM-23059] Provider Users who are also Organization Members cannot edit or delete items via Admin Console when admins can manage all items (#6573)
* removed providers check

* Fixed lint issues
2025-11-12 17:56:17 -05:00
renovate[bot]
7f04830f77 [deps]: Update actions/setup-node action to v6 (#6499) 2025-11-12 14:49:15 -06:00
cyprain-okeke
f0ec201745 [PM 26682]milestone 2d display discount on subscription page (#6542)
* The discount badge implementation

* Address the claude pr comments

* Add more unit testing

* Add more test

* used existing flag

* Add the coupon Ids

* Add more code documentation

* Add some recommendation from claude

* Fix addition comments and prs

* Add more integration test

* Fix some comment and add more test

* rename the test methods

* Add more unit test and comments

* Resolve the null issues

* Add more test

* reword the comments

* Rename Variable

* Some code refactoring

* Change the coupon ID to milestone-2c

* Fix the failing Test
2025-11-12 20:38:21 +01:00
SmithThe4th
de90108e0f [PM-27579] bw sync does not pull in new items stored in a collection (#6562)
* Updated sproc to update account revision date after cipher has been created in collection

* check response from update collection success

* removed the org check
2025-11-11 18:44:18 -05:00
Alex Morask
691047039b [PM-27849] Check for sm-standalone on subscription (#6545)
* Fix coupon check

* Fixed in FF off scenario

* Run dotnet format
2025-11-11 16:01:48 -06:00
Nick Krantz
ea233580d2 add vault skeleton loader feature flag (#6566) 2025-11-11 14:29:55 -06:00
Stephon Brown
db36c52c62 Milestone 2C Update (#6560)
* fix(billing): milestone update

* tests(billing): update tests
2025-11-10 16:07:14 -05:00
Jared McCannon
4de10c830d [PM-26636] Set Key when Confirming (#6550)
* When confirming a uesr, we need to set the key. :face_palm:

* Adding default value.
2025-11-10 14:46:52 -06:00
Brant DeBow
4fac635272 Remove EventBasedOrganizationIntegrations feature flag (#6538)
* Remove EventBasedOrganizationIntegrations feature flag

* Remove unnecessary nullable enable

* Refactored service collection extensions to follow a more direct path: ASB, RabbitMQ, Azure Queue, Repository, No-op

* Use TryAdd instead of Add
2025-11-10 14:57:04 -05:00
Brant DeBow
212f10d22b Extend Unit Test Coverage of Event Integrations (#6517)
* Extend Unit Test Coverage of Event Integrations

* Expanded SlackService error handling and tests

* Cleaned up a few issues noted by Claude
2025-11-10 14:55:36 -05:00
Ike
746b413cff [PM-21741] MJML welcome emails (#6549)
feat: Implement welcome email using MJML templating

- Implement MJML templates for welcome emails (individual, family, org)
- Create reusable MJML components (mj-bw-icon-row, mj-bw-learn-more-footer)
- Update documentation for MJML development process
2025-11-10 13:37:11 -05:00
Kyle Denney
b2543b5c0f [PM-24284] - milestone 3 (#6543)
* new feature flag

* first pass at changes

* safeguard against billing-pricing not being deployed yet

* handle families pre migration plan

* wrong stripe id

* tests

* unit tests
2025-11-10 11:51:00 -06:00
Rui Tomé
e7f3b6b12f [PM-26430] Remove Type property from PolicyRequestModel to use route parameter only (#6472)
* Enhance PolicyRequestModel and SavePolicyRequest with validation for policy data and metadata.

* Add integration tests for policy updates to validate handling of invalid data types in PolicyRequestModel and SavePolicyRequest.

* Add missing using

* Update PolicyRequestModel for null safety by making Data and ValidateAndSerializePolicyData nullable

* Add integration tests for public PoliciesController to validate handling of invalid data types in policy updates.

* Add PolicyDataValidator class for validating and serializing policy data and metadata based on policy type.

* Refactor PolicyRequestModel, SavePolicyRequest, and PolicyUpdateRequestModel to utilize PolicyDataValidator for data validation and serialization, removing redundant methods and improving code clarity.

* Update PolicyRequestModel and SavePolicyRequest to initialize Data and Metadata properties with empty dictionaries.

* Refactor PolicyDataValidator to remove null checks for input data in validation methods

* Rename test methods in SavePolicyRequestTests to reflect handling of empty data and metadata, and remove null assignments in test cases for improved clarity.

* Remove Type property from PolicyRequestModel to use route parameter only

* Run dotnet format

* Enhance error handling in PolicyDataValidator to include field-specific details in BadRequestException messages.

* Enhance PoliciesControllerTests to verify error messages for BadRequest responses by checking for specific field names in the response content.

* refactor: Update PolicyRequestModel and SavePolicyRequest to use nullable dictionaries for Data and Metadata properties; enhance validation methods in PolicyDataValidator to handle null cases.

* test: Add integration tests for handling policies with null data in PoliciesController

* fix: Catch specific JsonException in PolicyDataValidator to improve error handling

* test: Add unit tests for PolicyDataValidator to validate and serialize policy data and metadata

* test: Remove PolicyType from PolicyRequestModel in PoliciesControllerTests

* test: Update PolicyDataValidatorTests to validate organization data ownership metadata

* Refactor PoliciesControllerTests to include policy type in PutVNext method calls
2025-11-10 15:27:44 +00:00
Oscar Hinton
7d39efe29f [PM-27575] Add support for loading Mailer templates from disk (#6520)
Adds support for overloading mail templates from disk.
2025-11-10 08:40:40 +01:00
Alex Morask
22fe50c67a Expand coupon.applies_to (#6554) 2025-11-07 13:05:05 -06:00
Vincent Salucci
d1fecc2a0f chore: remove custom permissions feature flag definition, refs PM-20168 (#6551) 2025-11-07 09:48:19 -06:00
Oscar Hinton
356e4263d2 Add feature flags for desktop-ui migration (#6548) 2025-11-07 11:04:27 +01:00
Patrick-Pimentel-Bitwarden
43d14971f5 fix(prevent-bad-existing-sso-user): [PM-24579] Fix Prevent Existing Non Confirmed and Accepted SSO Users (#6529)
* fix(prevent-bad-existing-sso-user): [PM-24579] Precent Existing Non Confirmed and Accepted SSO Users - Fixed bad code and added comments.

* test(prevent-bad-existing-sso-user): [PM-24579] Precent Existing Non Confirmed and Accepted SSO Users - Added new test to make sure invited users aren't allowed through at the appropriate time.
2025-11-06 13:24:59 -05:00
Stephon Brown
5dbce33f74 [PM-24273] Milestone 2C (#6544)
* feat(billing): add mjml template and updated templates

* feat(billing): update maileservices

* feat(billing): add milestone2 discount

* feat(billing): add milestone 2 updates and stripe constants

* tests(billing): add handler tests

* fix(billing): update mailer view and templates

* fix(billing): revert mailservice changes

* fix(billing): swap mailer service in handler

* test(billing): update handler tests
2025-11-06 13:21:29 -05:00
Nick Krantz
087c6915e7 when ciphers are soft deleted, complete any associated security tasks (#6492) 2025-11-06 08:28:13 -06:00
Oscar Hinton
a1be1ae40b Group sdk-internal dep (#6530)
* Disable renovate for updates to internal sdk-internal

* Group instead

* Add trailing comma
2025-11-06 14:44:44 +01:00
Rui Tomé
4aed97b76b [PM-26690] Wire VNextSavePolicyCommand behind PolicyValidatorsRefactor feature flag (#6483)
* Add PolicyValidatorsRefactor constant to FeatureFlagKeys in Constants.cs

* Add Metadata property and ToSavePolicyModel method to PolicyUpdateRequestModel

* Refactor PoliciesController to utilize IVNextSavePolicyCommand based on feature flag

- Added IFeatureService and IVNextSavePolicyCommand dependencies to PoliciesController.
- Updated PutVNext method to conditionally use VNextSavePolicyCommand or SavePolicyCommand based on the PolicyValidatorsRefactor feature flag.
- Enhanced unit tests to verify behavior for both enabled and disabled states of the feature flag.

* Update public PoliciesController to to utilize IVNextSavePolicyCommand based on feature flag

- Introduced IFeatureService and IVNextSavePolicyCommand to manage policy saving based on the PolicyValidatorsRefactor feature flag.
- Updated the Put method to conditionally use the new VNextSavePolicyCommand or the legacy SavePolicyCommand.
- Added unit tests to validate the behavior of the Put method for both enabled and disabled states of the feature flag.

* Refactor VerifyOrganizationDomainCommand to utilize IVNextSavePolicyCommand based on feature flag

- Added IFeatureService and IVNextSavePolicyCommand dependencies to VerifyOrganizationDomainCommand.
- Updated EnableSingleOrganizationPolicyAsync method to conditionally use VNextSavePolicyCommand or SavePolicyCommand based on the PolicyValidatorsRefactor feature flag.
- Enhanced unit tests to validate the behavior when the feature flag is enabled.

* Enhance SsoConfigService to utilize IVNextSavePolicyCommand based on feature flag

- Added IFeatureService and IVNextSavePolicyCommand dependencies to SsoConfigService.
- Updated SaveAsync method to conditionally use VNextSavePolicyCommand or SavePolicyCommand based on the PolicyValidatorsRefactor feature flag.
- Added unit tests to validate the behavior when the feature flag is enabled.

* Refactor SavePolicyModel to simplify constructor usage by removing EmptyMetadataModel parameter. Update related usages across the codebase to reflect the new constructor overloads.

* Update PolicyUpdateRequestModel to make Metadata property nullable for improved null safety
2025-11-06 11:35:07 +00:00
Todd Martin
3668a445e5 chore(docs): Add docs for legacy mail service
* Added docs for legacy mail service.

* Updated namespaces.

* Consolidated under Platform.Mail namespace

* Updated obsolete comment.

* Linting

* Linting

* Replaced documentation in original readme after accidental deletion.
2025-11-04 11:54:39 -05:00
Alex Morask
04ed8abf5a Re-add missing checkbox (#6532) 2025-11-04 07:25:42 -06:00
Bernd Schoolmann
7e54773a6e Add summary comments for MasterKeyWrappedUserKey in response models (#6531) 2025-11-04 12:42:07 +01:00
Vincent Salucci
b4d6f3cb35 chore: fix provider account recovery flag key, refs PM-24192 (#6533) 2025-11-03 13:32:09 -06:00
Dave
bda2bd8ac1 fix(base-request-validator) [PM-21153] Recovery Code Not Functioning for SSO-required Users (#6481)
* chore(feature-flag-keys) [PM-21153]: Add feature flag key for BaseRequestValidator changes.

* fix(base-request-validator) [PM-21153]: Add validation state model for composable validation scenarios.

* fix(base-request-validator) [PM-21153]: Update BaseRequestValidator to allow validation scenarios to be composable.

* fix(base-request-validator) [PM-21153]: Remove validation state object in favor of validator context, per team discussion.

* feat(base-request-validator) [PM-21153]: Update tests to use issue feature flag, both execution paths.

* fix(base-request-validator) [PM-21153]: Fix a null dictionary check.

* chore(base-request-validator) [PM-21153]: Add unit tests around behavior addressed in this feature.

* chore(base-request-validator) [PM-21153]: Update comments for clarity.

* chore(base-request-validator-tests) [PM-21153]: Update verbiage for tests.

* fix(base-request-validator) [PM-21153]: Update validators to no longer need completed scheme management, use 2FA flag for recovery scenarios.

* fix(base-request-validator-tests) [PM-21153]: Customize CustomValidatorRequestContext fixture to allow for setting of request-specific flags as part of the request validation (not eagerly truthy).
2025-11-03 12:24:00 -05:00
Robyn MacCallum
b329305b77 Update description for AutomaticAppLogIn policy (#6522) 2025-11-03 11:11:42 -05:00
Rui Tomé
1e2e4b9d4d [PM-26429] Add validation to policy data and metadata (#6460)
* Enhance PolicyRequestModel and SavePolicyRequest with validation for policy data and metadata.

* Add integration tests for policy updates to validate handling of invalid data types in PolicyRequestModel and SavePolicyRequest.

* Add missing using

* Update PolicyRequestModel for null safety by making Data and ValidateAndSerializePolicyData nullable

* Add integration tests for public PoliciesController to validate handling of invalid data types in policy updates.

* Add PolicyDataValidator class for validating and serializing policy data and metadata based on policy type.

* Refactor PolicyRequestModel, SavePolicyRequest, and PolicyUpdateRequestModel to utilize PolicyDataValidator for data validation and serialization, removing redundant methods and improving code clarity.

* Update PolicyRequestModel and SavePolicyRequest to initialize Data and Metadata properties with empty dictionaries.

* Refactor PolicyDataValidator to remove null checks for input data in validation methods

* Rename test methods in SavePolicyRequestTests to reflect handling of empty data and metadata, and remove null assignments in test cases for improved clarity.

* Enhance error handling in PolicyDataValidator to include field-specific details in BadRequestException messages.

* Enhance PoliciesControllerTests to verify error messages for BadRequest responses by checking for specific field names in the response content.

* refactor: Update PolicyRequestModel and SavePolicyRequest to use nullable dictionaries for Data and Metadata properties; enhance validation methods in PolicyDataValidator to handle null cases.

* test: Add integration tests for handling policies with null data in PoliciesController

* fix: Catch specific JsonException in PolicyDataValidator to improve error handling

* test: Add unit tests for PolicyDataValidator to validate and serialize policy data and metadata

* test: Update PolicyDataValidatorTests to validate organization data ownership metadata
2025-11-03 15:44:44 +00:00
Rui Tomé
de56b7f327 [PM-26099] Update public list members endpoint to include collections (#6503)
* Add CreateCollectionAsync method to OrganizationTestHelpers for collection creation with user and group associations

* Update public MembersController List endpoint to include associated collections in member response model

* Update MembersControllerTests to validate collection associations in List endpoint. Add JsonConstructor to AssociationWithPermissionsResponseModel

* Refactor MembersController by removing unused IUserService and IApplicationCacheService dependencies.

* Remove nullable disable directive from Public MembersController
2025-11-03 15:24:40 +00:00