1
0
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:
Thomas Rittson
2021-09-02 07:51:04 +10:00
committed by GitHub
parent cc359e905b
commit bc73452400
3 changed files with 5 additions and 15 deletions

View File

@@ -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;
}