1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00

EC-293 Fix device verification state when getting its settings (#2094)

This commit is contained in:
Federico Maccaroni 2022-07-05 18:44:07 -03:00 committed by GitHub
parent 45a005d652
commit 580987f0e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -391,7 +391,8 @@ namespace Bit.Api.Controllers
return new DeviceVerificationResponseModel(false, false);
}
return new DeviceVerificationResponseModel(_userService.CanEditDeviceVerificationSettings(user), user.UnknownDeviceVerificationEnabled);
var canUserEditDeviceVerificationSettings = _userService.CanEditDeviceVerificationSettings(user);
return new DeviceVerificationResponseModel(canUserEditDeviceVerificationSettings, canUserEditDeviceVerificationSettings && user.UnknownDeviceVerificationEnabled);
}
[HttpPut("device-verification-settings")]