From 7d47dac65faa3e7940886cb76731a4d85240e583 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 1 Apr 2019 08:28:36 -0400 Subject: [PATCH] DisableEmailNewDevice --- src/Core/GlobalSettings.cs | 2 +- src/Core/IdentityServer/ResourceOwnerPasswordValidator.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/GlobalSettings.cs b/src/Core/GlobalSettings.cs index a68273b7b..892ca9ffa 100644 --- a/src/Core/GlobalSettings.cs +++ b/src/Core/GlobalSettings.cs @@ -14,7 +14,7 @@ namespace Bit.Core public virtual string InternalIdentityKey { get; set; } public virtual string HibpBreachApiKey { get; set; } public virtual bool DisableUserRegistration { get; set; } - public virtual bool DisableNewDeviceEmails { get; set; } + public virtual bool DisableEmailNewDevice { get; set; } public virtual InstallationSettings Installation { get; set; } = new InstallationSettings(); public virtual BaseServiceUriSettings BaseServiceUri { get; set; } = new BaseServiceUriSettings(); public virtual SqlSettings SqlServer { get; set; } = new SqlSettings(); diff --git a/src/Core/IdentityServer/ResourceOwnerPasswordValidator.cs b/src/Core/IdentityServer/ResourceOwnerPasswordValidator.cs index 267854dd9..4f777105f 100644 --- a/src/Core/IdentityServer/ResourceOwnerPasswordValidator.cs +++ b/src/Core/IdentityServer/ResourceOwnerPasswordValidator.cs @@ -387,7 +387,7 @@ namespace Bit.Core.IdentityServer { var deviceType = device.Type.GetType().GetMember(device.Type.ToString()) .FirstOrDefault()?.GetCustomAttribute()?.GetName(); - if(!_globalSettings.DisableNewDeviceEmails) + if(!_globalSettings.DisableEmailNewDevice) { await _mailService.SendNewDeviceLoggedInEmail(user.Email, deviceType, now, _currentContext.IpAddress);