mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(plugin-authentication): CB-1355 users meta parameters
This commit is contained in:
+1
@@ -296,6 +296,7 @@ export class UserFormController implements IInitializableController, IDestructib
|
||||
|
||||
private async loadUser() {
|
||||
try {
|
||||
this.credentials.metaParameters = this.user.metaParameters;
|
||||
this.credentials.login = this.user.userId;
|
||||
this.credentials.roles = new Map(this.user.grantedRoles.map(roleId => ([roleId, true])));
|
||||
} catch (exception) {
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ export const UserInfo: TabContainerPanelComponent<IUserFormProps> = observer(fun
|
||||
<Loader state={userMetaParameters} inline>
|
||||
{() => userMetaParameters.data.length > 0 && styled(style)(
|
||||
<Group small gap vertical overflow>
|
||||
<GroupTitle keepSize>{translate('authentication_user_credentials')}</GroupTitle>
|
||||
<GroupTitle keepSize>{translate('authentication_user_meta_parameters')}</GroupTitle>
|
||||
|
||||
<Container wrap gap>
|
||||
<ObjectPropertyInfoForm
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ implements IInitializableController, IDestructibleController {
|
||||
private async loadUser() {
|
||||
try {
|
||||
// we create a copy to protect the current value from mutation
|
||||
await this.usersResource.load(this.userId);
|
||||
await this.usersResource.load(this.userId, ['includeMetaParameters']);
|
||||
await this.updateUser(this.userId);
|
||||
} catch (exception) {
|
||||
this.notificationService.logException(exception, `Can't load user ${this.userId}`);
|
||||
@@ -67,6 +67,6 @@ implements IInitializableController, IDestructibleController {
|
||||
if (!ResourceKeyUtils.includes(key, this.userId)) {
|
||||
return;
|
||||
}
|
||||
this.user = JSON.parse(JSON.stringify(await this.usersResource.load(this.userId)));
|
||||
this.user = JSON.parse(JSON.stringify(await this.usersResource.load(this.userId, ['includeMetaParameters'])));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ export default [
|
||||
|
||||
['authentication_user_name', 'User name'],
|
||||
['authentication_user_credentials', 'Credentials'],
|
||||
['authentication_user_meta_parameters', 'Parameters'],
|
||||
['authentication_user_current_password', 'Current password'],
|
||||
['authentication_user_new_password', 'New password'],
|
||||
['authentication_user_password', 'User password'],
|
||||
|
||||
@@ -27,6 +27,7 @@ export default [
|
||||
['authentication_administration_user_create_failed', 'Errore di creazione nuovo utente'],
|
||||
['authentication_user_name', 'Nome utente'],
|
||||
['authentication_user_credentials', 'Credenziali'],
|
||||
['authentication_user_meta_parameters', 'Parameters'],
|
||||
['authentication_user_current_password', 'Password corrente'],
|
||||
['authentication_user_new_password', 'Nuova password'],
|
||||
['authentication_user_password', 'Password utente'],
|
||||
|
||||
@@ -34,6 +34,7 @@ export default [
|
||||
|
||||
['authentication_user_name', 'Имя'],
|
||||
['authentication_user_credentials', 'Учетные данные'],
|
||||
['authentication_user_meta_parameters', 'Параметры'],
|
||||
['authentication_user_current_password', 'Текущий пароль'],
|
||||
['authentication_user_new_password', 'Новый пароль'],
|
||||
['authentication_user_password', 'Пароль'],
|
||||
|
||||
Reference in New Issue
Block a user