mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-04 01:30:15 +01:00
Allow admin to change password when auth mode is 'ldap_auth'
This commit is contained in:
parent
23506dc40f
commit
543a960ca2
@ -93,9 +93,10 @@ export class NavigatorComponent implements OnInit {
|
||||
}
|
||||
|
||||
public get canChangePassword(): boolean {
|
||||
return this.session.getCurrentUser() &&
|
||||
this.appConfigService.getConfig() &&
|
||||
this.appConfigService.getConfig().auth_mode != 'ldap_auth';
|
||||
let user = this.session.getCurrentUser();
|
||||
let config = this.appConfigService.getConfig();
|
||||
|
||||
return user && ((config && config.auth_mode != 'ldap_auth') || (user.user_id === 1 && user.username === 'admin'));
|
||||
}
|
||||
|
||||
matchLang(lang: string): boolean {
|
||||
|
Loading…
Reference in New Issue
Block a user