mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 09:08:26 +01:00
Mofify admin can't change existing pwd
This commit is contained in:
parent
0d4aaccd13
commit
81271c8e31
@ -17,6 +17,7 @@ import { NgForm } from '@angular/forms';
|
||||
import { InlineAlertComponent } from '../../shared/inline-alert/inline-alert.component';
|
||||
import { MessageHandlerService } from '../../shared/message-handler/message-handler.service';
|
||||
import {UserService} from "../user.service";
|
||||
import {TranslateService} from "@ngx-translate/core";
|
||||
|
||||
@Component({
|
||||
selector: 'change-password',
|
||||
@ -41,6 +42,7 @@ export class ChangePasswordComponent {
|
||||
constructor(
|
||||
private userService: UserService,
|
||||
private msgHandler: MessageHandlerService,
|
||||
private translateService: TranslateService,
|
||||
private ref: ChangeDetectorRef) { }
|
||||
|
||||
public get showProgress(): boolean {
|
||||
@ -106,12 +108,14 @@ export class ChangePasswordComponent {
|
||||
})
|
||||
.catch(error => {
|
||||
this.onGoing = false;
|
||||
if (this.msgHandler.isAppLevel(error)) {
|
||||
this.msgHandler.handleError(error);
|
||||
this.opened = false;
|
||||
} else {
|
||||
if (error.status === 400) {
|
||||
this.translateService.get("USER.EXISTING_PASSWORD").subscribe(
|
||||
res => {this.inlineAlert.showInlineError(res); });
|
||||
}else {
|
||||
this.inlineAlert.showInlineError(error);
|
||||
}
|
||||
let hnd = setInterval(() => this.ref.markForCheck(), 100);
|
||||
setTimeout(() => clearInterval(hnd), 2000);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,8 @@
|
||||
"DELETE_SUCCESS": "Users deleted successfully.",
|
||||
"ITEMS": "items",
|
||||
"OF": "of",
|
||||
"RESET_Ok": "Users password reset successfully"
|
||||
"RESET_Ok": "Users password reset successfully",
|
||||
"EXISTING_PASSWORD": "The new password can not be same with the old one"
|
||||
},
|
||||
"PROJECT": {
|
||||
"PROJECTS": "Projects",
|
||||
|
@ -136,7 +136,8 @@
|
||||
"DELETE_SUCCESS": "Usuario eliminado satisfactoriamente.",
|
||||
"ITEMS": "elementos",
|
||||
"OF": "of",
|
||||
"RESET_Ok": "Users password reset successfully"
|
||||
"RESET_Ok": "Users password reset successfully",
|
||||
"EXISTING_PASSWORD": "The new password can not be same with the old one"
|
||||
},
|
||||
"PROJECT": {
|
||||
"PROJECTS": "Proyectos",
|
||||
|
@ -119,7 +119,8 @@
|
||||
"DELETE_SUCCESS": "Utilisateur supprimé avec succès.",
|
||||
"ITEMS": "items",
|
||||
"OF": "de",
|
||||
"RESET_Ok": "Users password reset successfully"
|
||||
"RESET_Ok": "Users password reset successfully",
|
||||
"EXISTING_PASSWORD": "The new password can not be same with the old one"
|
||||
},
|
||||
"PROJECT": {
|
||||
"PROJECTS": "Projets",
|
||||
|
@ -136,7 +136,8 @@
|
||||
"DELETE_SUCCESS": "成功删除用户。",
|
||||
"OF": "共计",
|
||||
"ITEMS": "条记录",
|
||||
"RESET_Ok": "成功修改用户密码"
|
||||
"RESET_Ok": "成功修改用户密码",
|
||||
"EXISTING_PASSWORD": "新密码不能与旧密码一致"
|
||||
},
|
||||
"PROJECT": {
|
||||
"PROJECTS": "项目",
|
||||
|
Loading…
Reference in New Issue
Block a user