From 580987f0e548b97d0a4009c7a7d77a767a4d67b5 Mon Sep 17 00:00:00 2001 From: Federico Maccaroni Date: Tue, 5 Jul 2022 18:44:07 -0300 Subject: [PATCH] EC-293 Fix device verification state when getting its settings (#2094) --- src/Api/Controllers/TwoFactorController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Api/Controllers/TwoFactorController.cs b/src/Api/Controllers/TwoFactorController.cs index ab2e19eed8..b8e71f5dfa 100644 --- a/src/Api/Controllers/TwoFactorController.cs +++ b/src/Api/Controllers/TwoFactorController.cs @@ -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")]