Merge pull request #3916 from tdonohue/port_3818_to_7x

[Port dspace-7_x] Changing metadata in a user profile without specifying a password brings up a success and an error panel
This commit is contained in:
Tim Donohue
2025-01-29 06:48:54 -06:00
committed by GitHub

View File

@@ -173,7 +173,8 @@ export class ProfilePageComponent implements OnInit {
*/ */
updateSecurity() { updateSecurity() {
const passEntered = isNotEmpty(this.password); 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')); this.notificationsService.error(this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.general'));
} }
if (!this.invalidSecurity && passEntered) { if (!this.invalidSecurity && passEntered) {