1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

stub out use2fa and twofactorproviders on orgs

This commit is contained in:
Kyle Spearrin
2018-04-02 14:53:19 -04:00
parent 63169e4ecc
commit bcc224c02d
13 changed files with 361 additions and 6 deletions

View File

@ -68,7 +68,8 @@ namespace Bit.Core.Models.Table
if(_twoFactorProviders == null)
{
_twoFactorProviders =
JsonConvert.DeserializeObject<Dictionary<TwoFactorProviderType, TwoFactorProvider>>(TwoFactorProviders);
JsonConvert.DeserializeObject<Dictionary<TwoFactorProviderType, TwoFactorProvider>>(
TwoFactorProviders);
}
return _twoFactorProviders;
@ -107,7 +108,8 @@ namespace Bit.Core.Models.Table
return false;
}
return providers.Any(p => (p.Value?.Enabled ?? false) && (Premium || !TwoFactorProvider.RequiresPremium(p.Key)));
return providers.Any(p => (p.Value?.Enabled ?? false) &&
(Premium || !TwoFactorProvider.RequiresPremium(p.Key)));
}
public TwoFactorProvider GetTwoFactorProvider(TwoFactorProviderType provider)