1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-06 00:03:29 +00:00

Use MP policies when registering a new user through SSO (#587)

* use MP policies when registering a new user through SSO

* prettier and linting
This commit is contained in:
Jake Fink
2021-12-21 12:02:56 -05:00
committed by GitHub
parent 9e26336549
commit 3d7b427b0e
6 changed files with 31 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ export class ChangePasswordComponent implements OnInit {
async ngOnInit() {
this.email = await this.stateService.getEmail();
this.enforcedPolicyOptions = await this.policyService.getMasterPasswordPolicyOptions();
this.enforcedPolicyOptions ??= await this.policyService.getMasterPasswordPolicyOptions();
}
async submit() {

View File

@@ -79,6 +79,8 @@ export class SetPasswordComponent extends BaseChangePasswordComponent {
const response = await this.apiService.getOrganizationAutoEnrollStatus(this.identifier);
this.orgId = response.id;
this.resetPasswordAutoEnroll = response.resetPasswordEnabled;
this.enforcedPolicyOptions =
await this.policyService.getMasterPasswordPoliciesForInvitedUsers(this.orgId);
} catch {
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
}