1
0
mirror of https://github.com/bitwarden/server synced 2025-12-20 18:23:44 +00:00
Commit Graph

6434 Commits

Author SHA1 Message Date
Hinton
2e3b015feb Fix mocking in PlayIdServiceTests 2025-11-21 13:12:09 +01:00
Matt Gibson
1e7e3db807 Prefer startup pattern to program pattern 2025-11-19 16:41:14 -08:00
Matt Gibson
811a234c65 Remove force ef setting 2025-11-19 14:09:51 -08:00
Matt Gibson
833e181a5a Address pr feedback 2025-11-18 15:58:42 -08:00
Matt Gibson
58afdd5e5c Use test sqlite database 2025-11-18 15:03:48 -08:00
Matt Gibson
620830bfd8 fixup routing and sdk links 2025-11-18 11:00:09 -08:00
Matt Gibson
ac036efdae Provide playIdService to seeder 2025-11-18 10:59:43 -08:00
Matt Gibson
54e4c7e66d fixup playIdService dependencies 2025-11-18 10:02:12 -08:00
Matt Gibson
ccc89e7268 differentially inject playId middleware 2025-11-18 09:38:18 -08:00
Matt Gibson
439bf37b7f use DI to determine whether to track play Ids 2025-11-18 05:07:03 -08:00
Matt Gibson
d6eaafb308 recreate ef migrations 2025-11-17 18:41:31 -08:00
Matt Gibson
1ebfac18a2 fixup seededData vs playData migrations 2025-11-17 14:45:38 -08:00
Matt Gibson
14044ff5fb Inject playId services in tests and don't fail if it's not found 2025-11-17 12:53:36 -08:00
Hinton
d9134d2a60 Fix lint 2025-11-14 14:54:50 +01:00
Hinton
076397dfd4 Revert "Fixup device table user FK cascade"
This reverts commit 3d863c0fd1.
2025-11-14 14:46:39 +01:00
Hinton
fcdbfcb601 Move delete many complexity to service 2025-11-14 14:45:02 +01:00
Hinton
d9b5ab2f67 Fix tests 2025-11-14 14:31:32 +01:00
Hinton
dff45c137d Add documentation 2025-11-13 13:14:43 +01:00
Hinton
840307fe4a Document queries and scenes 2025-11-13 11:45:11 +01:00
Hinton
5b67c9f25d Fix format 2025-11-13 10:37:02 +01:00
Matt Gibson
f2116734a2 Use a header to track seeded data. This has benefits client side in simplicity and allows us to track entities added during a test, as long as they include the play id header. 2025-11-10 18:17:41 -08:00
Matt Gibson
0b22af53da Merge remote-tracking branch 'origin/main' into arch/seeder-api 2025-11-04 21:43:51 -08:00
Matt Gibson
e96e70cc22 Create PlayData table and services
Shift from seeded data tracking that is all server-side to play ids and x-play-id headers that are appended from the clients to track entities added by tests.
2025-11-04 16:26:06 -08: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
Github Actions
0ea9e2e48a Bumped version to 2025.11.0 2025-11-03 14:29:04 +00:00
Thomas Rittson
e11458196c [PM-24192] Move account recovery logic to command (#6184)
* Move account recovery logic to command
  (temporarily duplicated behind feature flag)

* Move permission checks to authorization handler

* Prevent user from recovering provider member account
  unless they are also provider member
2025-11-01 07:55:25 +10:00
Github Actions
09564947e8 Bumped version to 2025.10.2 2025-10-31 21:38:53 +00:00
Jimmy Vo
21cc0b38b0 [PM-26401] Add logging logic (#6523) 2025-10-31 14:47:22 -04:00
Daniel James Smith
d40d705aac Revert feature flag removal for Chromium importers (#6526)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-10-31 18:40:54 +01:00
Alex Morask
410e754cd9 [PM-27553] Resolve premium purchase for user with account credit that used payment method (#6514)
* Update payment method for customer purchasing premium who has account credit but used a payment method

* Claude feedback + dotnet run format
2025-10-31 12:37:01 -05:00
Vijay Oommen
e102a7488e [PM-26967] Added new metric properties (#6519) 2025-10-30 16:54:05 -05:00
MtnBurrit0
b8325414bf Disable environment synchronization in workflow (#6525) 2025-10-30 12:55:28 -07:00
Jared McCannon
07a18d31a9 [PM-27594] - Update Org and License with Token (#6518)
* Updating the license and org with claims when updating via license token.

* Removing the fature flag check and adding a null check.

* Added to method.
2025-10-30 14:34:18 -05:00
Matt Gibson
3f22adcbf2 Split scene service and query service
rename instances of `recipe` to `scene`
2025-10-30 09:08:36 -07:00
Matt Gibson
2d50d05587 Rename service file to service name 2025-10-30 07:34:49 -07:00
Matt Gibson
878b78b51e Stricter scene and query types
SeederAPI only serves Scenes, Recipes are inteded to be used locally only.
2025-10-29 12:27:15 -07:00
Stephon Brown
cfe818e0aa Milestone 2b Update (#6515)
* feat(billing): add feature flag

* feat(billing): implement feature flag

* fix(billing): update logic

* fix(billing): revert spacing
2025-10-29 13:12:16 -04:00
Kyle Denney
ca0d5bf8cb [PM-23713] plans controller needs app authorize so desktop and browser can use (#6512) 2025-10-29 10:18:49 -05:00
mkincaid-bw
4b1685d346 Change recovery model for db's in full mode with no t-log backups (#6474) 2025-10-29 08:10:17 -07:00
Ben Brooks
d97593e91d Add validation to URI Match Default Policy for Single Org prerequisite (#6454)
* Add validation to URI Match Default Policy for Single Org prerequisite

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Remove nullable enable; Replace Task.FromResult(0) with Task.CompletedTask

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Add unit test for our new validator

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Improve comments and whitespace for unit test

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Remove unnecessary whitespace in unit test

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Remove unneccessary unit tets

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Re-add using NSubstitute

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Revert unintended changes to AccountControllerTest.cs

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Revert unintended changes to AccountControllerTest.cs

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Revert unintended changes to HubHelpersTest.cs

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

* Add IEnforceDependentPoliciesEvent interface to UriMatchDefaultPolicyValidator

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>

---------

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
2025-10-29 07:53:48 -07:00
Alex Morask
5f0e0383a5 Remove FF (#6456) 2025-10-29 07:41:42 -05:00
Jordan Aasen
8f2f2046b7 [PM-27554] - add autofill confirm from search flag (#6511)
* add autofill confirm from search flag

* move flag
2025-10-28 15:08:03 -07:00
Matt Bishop
394e91d639 Handle null cipher or organization with event submission (#6509)
* Handle null cipher

* Check for an org being null too

* Add unit and integration tests

* Clean up unused members
2025-10-28 16:31:05 -04:00