mirror of
https://github.com/bitwarden/server
synced 2025-12-28 14:13:48 +00:00
EC-198 Added feature flag for 2FA Email for new device login (#1993)
* EC-198 added global setting flag for 2FA email on new device login feature * EC-198 Removed is development environment check on 2FA email new device login given that we can now rely on the global settings feature flag * EC-198 Improved IGlobalSettings and UserService code for testing
This commit is contained in:
committed by
GitHub
parent
bbb55ef8de
commit
2e2d3075d1
@@ -69,6 +69,7 @@ namespace Bit.Core.Settings
|
||||
public virtual AppleIapSettings AppleIap { get; set; } = new AppleIapSettings();
|
||||
public virtual SsoSettings Sso { get; set; } = new SsoSettings();
|
||||
public virtual StripeSettings Stripe { get; set; } = new StripeSettings();
|
||||
public virtual ITwoFactorAuthSettings TwoFactorAuth { get; set; } = new TwoFactorAuthSettings();
|
||||
|
||||
public string BuildExternalUri(string explicitValue, string name)
|
||||
{
|
||||
@@ -480,5 +481,10 @@ namespace Bit.Core.Settings
|
||||
public string ApiKey { get; set; }
|
||||
public int MaxNetworkRetries { get; set; } = 2;
|
||||
}
|
||||
|
||||
public class TwoFactorAuthSettings : ITwoFactorAuthSettings
|
||||
{
|
||||
public bool EmailOnNewDeviceLogin { get; set; } = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using static Bit.Core.Settings.GlobalSettings;
|
||||
|
||||
namespace Bit.Core.Settings
|
||||
namespace Bit.Core.Settings
|
||||
{
|
||||
public interface IGlobalSettings
|
||||
{
|
||||
@@ -10,9 +8,11 @@ namespace Bit.Core.Settings
|
||||
string LicenseDirectory { get; set; }
|
||||
string LicenseCertificatePassword { get; set; }
|
||||
int OrganizationInviteExpirationHours { get; set; }
|
||||
bool DisableUserRegistration { get; set; }
|
||||
IInstallationSettings Installation { get; set; }
|
||||
IFileStorageSettings Attachment { get; set; }
|
||||
IConnectionStringSettings Storage { get; set; }
|
||||
IBaseServiceUriSettings BaseServiceUri { get; set; }
|
||||
ITwoFactorAuthSettings TwoFactorAuth { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
7
src/Core/Settings/ITwoFactorAuthSettings.cs
Normal file
7
src/Core/Settings/ITwoFactorAuthSettings.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Bit.Core.Settings
|
||||
{
|
||||
public interface ITwoFactorAuthSettings
|
||||
{
|
||||
bool EmailOnNewDeviceLogin { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user