1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-06 10:33:57 +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

@@ -136,8 +136,9 @@ export class PeopleComponent extends BasePeopleComponent<OrganizationUserUserDet
}
async load() {
const policies = await this.policyService.getAll(PolicyType.ResetPassword);
this.orgResetPasswordPolicyEnabled = policies.some(p => p.organizationId === this.organizationId && p.enabled);
const resetPasswordPolicy = await this.policyService.getPolicyForOrganization(PolicyType.ResetPassword,
this.organizationId);
this.orgResetPasswordPolicyEnabled = resetPasswordPolicy?.enabled;
super.load();
}