From 542852a3be13328acac8019a5b358e2608883a43 Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Fri, 8 Oct 2021 11:18:25 -0500 Subject: [PATCH] [Reset Password] BUG - Update local policies for enforcement (#510) --- angular/src/components/update-temp-password.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/angular/src/components/update-temp-password.component.ts b/angular/src/components/update-temp-password.component.ts index c0e6b46d2..13875631c 100644 --- a/angular/src/components/update-temp-password.component.ts +++ b/angular/src/components/update-temp-password.component.ts @@ -7,6 +7,7 @@ import { MessagingService } from 'jslib-common/abstractions/messaging.service'; import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { PolicyService } from 'jslib-common/abstractions/policy.service'; +import { SyncService } from 'jslib-common/abstractions/sync.service'; import { UserService } from 'jslib-common/abstractions/user.service'; import { ChangePasswordComponent as BaseChangePasswordComponent } from './change-password.component'; @@ -29,11 +30,17 @@ export class UpdateTempPasswordComponent extends BaseChangePasswordComponent { constructor(i18nService: I18nService, platformUtilsService: PlatformUtilsService, passwordGenerationService: PasswordGenerationService, policyService: PolicyService, cryptoService: CryptoService, userService: UserService, - messagingService: MessagingService, private apiService: ApiService) { + messagingService: MessagingService, private apiService: ApiService, + private syncService: SyncService) { super(i18nService, cryptoService, messagingService, userService, passwordGenerationService, platformUtilsService, policyService); } + async ngOnInit() { + await this.syncService.fullSync(true); + super.ngOnInit(); + } + togglePassword(confirmField: boolean) { this.showPassword = !this.showPassword; document.getElementById(confirmField ? 'masterPasswordRetype' : 'masterPassword').focus();