mirror of
https://github.com/bitwarden/web
synced 2025-12-22 03:03:26 +00:00
Move policy checks within policyService (#1149)
* Refactor: use new policyService methods * Update jslib
This commit is contained in:
@@ -168,8 +168,7 @@ export class TwoFactorSetupComponent implements OnInit {
|
||||
|
||||
private async evaluatePolicies() {
|
||||
if (this.organizationId == null && this.providers.filter(p => p.enabled).length === 1) {
|
||||
const policies = await this.policyService.getAll(PolicyType.TwoFactorAuthentication);
|
||||
this.showPolicyWarning = policies != null && policies.some(p => p.enabled);
|
||||
this.showPolicyWarning = await this.policyService.policyAppliesToUser(PolicyType.TwoFactorAuthentication);
|
||||
} else {
|
||||
this.showPolicyWarning = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user