mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
added org duo to 2fa flow
This commit is contained in:
@ -12,12 +12,15 @@ namespace Bit.Core.Models.Data
|
||||
Id = organization.Id;
|
||||
UseEvents = organization.UseEvents;
|
||||
Use2fa = organization.Use2fa;
|
||||
Using2fa = organization.Use2fa && organization.TwoFactorProviders != null &&
|
||||
organization.TwoFactorProviders != "{}";
|
||||
Enabled = organization.Enabled;
|
||||
}
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public bool UseEvents { get; set; }
|
||||
public bool Use2fa { get; set; }
|
||||
public bool Using2fa { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -133,6 +133,13 @@ namespace Bit.Core.Models.Table
|
||||
|
||||
public void SetTwoFactorProviders(Dictionary<TwoFactorProviderType, TwoFactorProvider> providers)
|
||||
{
|
||||
if(!providers.Any())
|
||||
{
|
||||
TwoFactorProviders = null;
|
||||
_twoFactorProviders = null;
|
||||
return;
|
||||
}
|
||||
|
||||
TwoFactorProviders = JsonConvert.SerializeObject(providers, new JsonSerializerSettings
|
||||
{
|
||||
ContractResolver = new EnumKeyResolver<byte>()
|
||||
|
Reference in New Issue
Block a user