From 47159fe15bc2c7db1fbfff27badc7c91d04b570b Mon Sep 17 00:00:00 2001 From: VictorDuranEscire Date: Tue, 28 Jan 2025 17:07:00 -0600 Subject: [PATCH] Changing metadata in a user profile without specifying a password brings up a success and an error panel (#3818) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Agregar validador para mostrar mensaje de error solo si se escribe la contraseƱa actual * Agregar validador para mostrar mensaje de error solo si se escribe la contraseƱa actual * Set constant variable for valid current password in profile page --- src/app/profile-page/profile-page.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/profile-page/profile-page.component.ts b/src/app/profile-page/profile-page.component.ts index a8ac070e70..f3f7a4e7f1 100644 --- a/src/app/profile-page/profile-page.component.ts +++ b/src/app/profile-page/profile-page.component.ts @@ -220,7 +220,8 @@ export class ProfilePageComponent implements OnInit { */ updateSecurity() { const passEntered = isNotEmpty(this.password); - if (this.invalidSecurity) { + const validCurrentPassword = isNotEmpty(this.currentPassword); + if (validCurrentPassword && !passEntered) { this.notificationsService.error(this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.general')); } if (!this.invalidSecurity && passEntered) {