1
0
mirror of https://github.com/bitwarden/server.git synced 2025-03-12 13:29:14 +01:00

[PM-15605] Return VerifyDevices in Profile sync response (#5264)

* feat (NewDeviceVerification) : 
- Database migration scripts for VerifyDevices column in [dbo].[User].
- Updated DeviceValidator to check if user has opted out of device verification.
- Added endpoint to AccountsController.cs to allow editing of new User.VerifyDevices property.
- Added tests for new methods and endpoint. 
- Removed Anon attribute from the POST account/verify-devices endpoint.
- Updating queries to track dbo.User.VerifyDevices.
- Added update to verify email to the new device verification flow.
- Updating some tests for CloudOrganizationSignUpCommand that were failing.
- Updating ProfileResponseModel to include the new VerifyDevices data to hydrate the state in the web client.
This commit is contained in:
Ike 2025-01-20 16:35:43 -08:00 committed by GitHub
parent 0de108e051
commit 9efcbec041
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,6 +37,7 @@ public class ProfileResponseModel : ResponseModel
UsesKeyConnector = user.UsesKeyConnector;
AvatarColor = user.AvatarColor;
CreationDate = user.CreationDate;
VerifyDevices = user.VerifyDevices;
Organizations = organizationsUserDetails?.Select(o => new ProfileOrganizationResponseModel(o, organizationIdsManagingUser));
Providers = providerUserDetails?.Select(p => new ProfileProviderResponseModel(p));
ProviderOrganizations =
@ -62,6 +63,7 @@ public class ProfileResponseModel : ResponseModel
public bool UsesKeyConnector { get; set; }
public string AvatarColor { get; set; }
public DateTime CreationDate { get; set; }
public bool VerifyDevices { get; set; }
public IEnumerable<ProfileOrganizationResponseModel> Organizations { get; set; }
public IEnumerable<ProfileProviderResponseModel> Providers { get; set; }
public IEnumerable<ProfileProviderOrganizationResponseModel> ProviderOrganizations { get; set; }