mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
Use the correct policy enum type (#2045)
Explicit conversion from non-generics to generics doesn't seem to work here, so I moved to using the read methods already on base Policy.
This commit is contained in:
@ -182,10 +182,10 @@ namespace Bit.Api.Controllers
|
||||
throw new UnauthorizedAccessException();
|
||||
}
|
||||
|
||||
var masterPasswordPolicy = await _policyRepository.GetByOrganizationIdTypeAsync<ResetPasswordDataModel>(orgId, PolicyType.MasterPassword);
|
||||
var masterPasswordPolicy = await _policyRepository.GetByOrganizationIdTypeAsync(orgId, PolicyType.ResetPassword);
|
||||
var useMasterPasswordPolicy = masterPasswordPolicy != null &&
|
||||
masterPasswordPolicy.Enabled &&
|
||||
masterPasswordPolicy.DataModel.AutoEnrollEnabled;
|
||||
masterPasswordPolicy.GetDataModel<ResetPasswordDataModel>().AutoEnrollEnabled;
|
||||
|
||||
if (useMasterPasswordPolicy &&
|
||||
string.IsNullOrWhiteSpace(model.ResetPasswordKey))
|
||||
|
Reference in New Issue
Block a user