mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(plugin-authentication): CB-416 user editing login check
This commit is contained in:
+13
-11
@@ -143,19 +143,21 @@ export class UserFormController implements IInitializableController, IDestructib
|
||||
};
|
||||
|
||||
private validate() {
|
||||
if (!this.credentials.login.trim()) {
|
||||
this.notificationService.logError({ title: 'authentication_user_login_not_set' });
|
||||
return;
|
||||
}
|
||||
if (!this.editing) {
|
||||
if (!this.credentials.login.trim()) {
|
||||
this.notificationService.logError({ title: 'authentication_user_login_not_set' });
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.rolesManagerService.roles.has(this.credentials.login)) {
|
||||
this.notificationService.logError({ title: 'authentication_user_login_cant_be_used' });
|
||||
return;
|
||||
}
|
||||
if (this.rolesManagerService.roles.has(this.credentials.login)) {
|
||||
this.notificationService.logError({ title: 'authentication_user_login_cant_be_used' });
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.usersResource.has(this.credentials.login)) {
|
||||
this.notificationService.logError({ title: 'authentication_user_login_already_exists' });
|
||||
return;
|
||||
if (this.usersResource.has(this.credentials.login)) {
|
||||
this.notificationService.logError({ title: 'authentication_user_login_already_exists' });
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.isRoleSelected()) {
|
||||
|
||||
Reference in New Issue
Block a user