diff --git a/SECURITY.md b/SECURITY.md index 9d72644c1e..094ed1ba00 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,9 +9,10 @@ currently being supported with security updates. | ------- | --------- | | 22.x | yes | | 23.x | yes | +| 24.x | yes | ## Reporting a Vulnerability -Please report (suspected) security vulnerabilities to devops@dbeaver.com. -You will receive a response from us within 48 hours. -If the issue is confirmed, we will release a patch as soon as possible depending on complexity but historically within a few days. +Please report (suspected) security vulnerabilities to devops@dbeaver.com. +You will receive a response from us within 48 hours. +If the issue is confirmed, we will release a patch as soon as possible, depending on complexity, but historically, within a few days. diff --git a/config/GlobalConfiguration/.dbeaver/data-sources.json b/config/GlobalConfiguration/.dbeaver/data-sources.json index c954ec82d9..a5f18e204f 100644 --- a/config/GlobalConfiguration/.dbeaver/data-sources.json +++ b/config/GlobalConfiguration/.dbeaver/data-sources.json @@ -1,24 +1,4 @@ { - "folders": {}, - "connections": { - "postgresql-template-1": { - "provider": "postgresql", - "driver": "postgres-jdbc", - "name": "PostgreSQL (Template)", - "save-password": false, - "show-system-objects": false, - "read-only": true, - "template": true, - "configuration": { - "host": "localhost", - "port": "5432", - "database": "postgres", - "url": "jdbc:postgresql://localhost:5432/postgres", - "type": "dev", - "provider-properties": { - "@dbeaver-show-non-default-db@": "false" - } - } - } - } + "folders": {}, + "connections": {} } diff --git a/webapp/packages/core-blocks/src/FormControls/Filter.tsx b/webapp/packages/core-blocks/src/FormControls/Filter.tsx index c7df95ab9f..162ae2a57d 100644 --- a/webapp/packages/core-blocks/src/FormControls/Filter.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Filter.tsx @@ -116,7 +116,7 @@ export const Filter = observer>(functio autoComplete="off" className={s(styles, { inputField: true })} placeholder={placeholder} - disabled={disabled} + readOnly={disabled} name={name} value={value} onChange={handleChange} diff --git a/webapp/packages/core-blocks/src/FormControls/InputField/InputField.module.css b/webapp/packages/core-blocks/src/FormControls/InputField/InputField.module.css index 80befd67bb..6a36510309 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputField/InputField.module.css +++ b/webapp/packages/core-blocks/src/FormControls/InputField/InputField.module.css @@ -47,10 +47,8 @@ align-items: center; justify-content: center; } - .input[disabled] + .iconContainer { cursor: auto; - opacity: 0.8; } .input:not(:only-child) { padding-right: 32px !important; diff --git a/webapp/packages/core-blocks/src/InfoItem.module.css b/webapp/packages/core-blocks/src/InfoItem.module.css index 5a8c0a4106..71f2362414 100644 --- a/webapp/packages/core-blocks/src/InfoItem.module.css +++ b/webapp/packages/core-blocks/src/InfoItem.module.css @@ -10,8 +10,15 @@ align-items: center; flex: 0 0 auto; } + .iconOrImage { width: 24px; height: 24px; margin-right: 16px; + + &.compact { + width: 18px; + height: 18px; + margin-right: 8px; + } } diff --git a/webapp/packages/core-blocks/src/InfoItem.tsx b/webapp/packages/core-blocks/src/InfoItem.tsx index f0039e961a..ea73c59c76 100644 --- a/webapp/packages/core-blocks/src/InfoItem.tsx +++ b/webapp/packages/core-blocks/src/InfoItem.tsx @@ -18,19 +18,20 @@ import { useS } from './useS.js'; export interface IInfoItem { info: TLocalizationToken; icon?: string; + compact?: boolean; } interface Props extends IInfoItem { className?: string; } -export const InfoItem = observer(function InfoItem({ info, icon = '/icons/info_icon.svg', className }) { +export const InfoItem = observer(function InfoItem({ info, compact, icon = '/icons/info_icon.svg', className }) { const styles = useS(style); const translate = useTranslate(); return (
- + {translate(info)}
); diff --git a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/RenderField.tsx b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/RenderField.tsx index f3560b3ee2..d8aa15dae7 100644 --- a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/RenderField.tsx +++ b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/RenderField.tsx @@ -221,8 +221,7 @@ export const RenderField = observer(function RenderField({ placeholder={passwordSavedMessage} name={property.id!} value={value} - disabled={disabled} - readOnly={readOnly} + readOnly={readOnly || disabled} className={className} > {property.displayName ?? ''} @@ -243,8 +242,7 @@ export const RenderField = observer(function RenderField({ autoHide={autoHide} description={property.hint} placeholder={passwordSavedMessage} - disabled={disabled} - readOnly={readOnly} + readOnly={readOnly || disabled} autoComplete={RESERVED_KEYWORDS.includes(autofillToken) ? autofillToken : `${autofillToken} ${property.id}`} className={className} canShowPassword={canShowPassword} @@ -266,8 +264,7 @@ export const RenderField = observer(function RenderField({ defaultValue={defaultValue} description={property.hint} placeholder={passwordSavedMessage} - disabled={disabled} - readOnly={readOnly} + readOnly={readOnly || disabled} autoComplete={RESERVED_KEYWORDS.includes(autofillToken) ? autofillToken : `${autofillToken} ${property.id}`} className={className} canShowPassword={canShowPassword} diff --git a/webapp/packages/core-connections/src/locales/de.ts b/webapp/packages/core-connections/src/locales/de.ts index c92b054ac0..e5ee57cb7f 100644 --- a/webapp/packages/core-connections/src/locales/de.ts +++ b/webapp/packages/core-connections/src/locales/de.ts @@ -58,4 +58,5 @@ export default [ ['core_connections_settings_disable', 'Disable'], ['core_connections_settings_disable_description', 'Disable the ability to create new connections'], + ['connections_templates_deprecated_message', 'Template connections are deprecated and will be removed in future releases'], ]; diff --git a/webapp/packages/core-connections/src/locales/en.ts b/webapp/packages/core-connections/src/locales/en.ts index ca44fcca48..93133fd7db 100644 --- a/webapp/packages/core-connections/src/locales/en.ts +++ b/webapp/packages/core-connections/src/locales/en.ts @@ -102,4 +102,5 @@ export default [ ['core_connections_settings_disable', 'Disable'], ['core_connections_settings_disable_description', 'Disable the ability to create new connections'], + ['connections_templates_deprecated_message', 'Template connections are deprecated and will be removed in future releases'], ]; diff --git a/webapp/packages/core-connections/src/locales/fr.ts b/webapp/packages/core-connections/src/locales/fr.ts index c38d142279..808e902f12 100644 --- a/webapp/packages/core-connections/src/locales/fr.ts +++ b/webapp/packages/core-connections/src/locales/fr.ts @@ -111,4 +111,5 @@ export default [ ['core_connections_settings_disable', 'Disable'], ['core_connections_settings_disable_description', 'Disable the ability to create new connections'], + ['connections_templates_deprecated_message', 'Template connections are deprecated and will be removed in future releases'], ]; diff --git a/webapp/packages/core-connections/src/locales/it.ts b/webapp/packages/core-connections/src/locales/it.ts index 3d3002693b..f5f61ab238 100644 --- a/webapp/packages/core-connections/src/locales/it.ts +++ b/webapp/packages/core-connections/src/locales/it.ts @@ -100,4 +100,5 @@ export default [ ['core_connections_settings_disable', 'Disable'], ['core_connections_settings_disable_description', 'Disable the ability to create new connections'], + ['connections_templates_deprecated_message', 'Template connections are deprecated and will be removed in future releases'], ]; diff --git a/webapp/packages/core-connections/src/locales/ru.ts b/webapp/packages/core-connections/src/locales/ru.ts index ae8dfeae11..804cb0b13f 100644 --- a/webapp/packages/core-connections/src/locales/ru.ts +++ b/webapp/packages/core-connections/src/locales/ru.ts @@ -103,4 +103,5 @@ export default [ ['core_connections_settings_disable', 'Отключить'], ['core_connections_settings_disable_description', 'Отключить возможность создания новых подключений'], + ['connections_templates_deprecated_message', 'Шаблоны подключений больше не поддерживаются и будут удалены в будущих релизах'], ]; diff --git a/webapp/packages/core-connections/src/locales/zh.ts b/webapp/packages/core-connections/src/locales/zh.ts index 57f7bfbb5b..027ec3a69a 100644 --- a/webapp/packages/core-connections/src/locales/zh.ts +++ b/webapp/packages/core-connections/src/locales/zh.ts @@ -37,10 +37,7 @@ export default [ ['connections_connection_authentication_save_credentials_for_session', '当前会话不再询问'], ['connections_connection_authentication_save_credentials_for_session_tooltip', '注销后将移除凭证'], ['connections_connection_edit_save_credentials_shared', '为所有访问用户保存凭证'], - [ - 'connections_connection_edit_save_credentials_shared_tooltip', - '凭证将用于为所有访问用户自动连接数据库', - ], + ['connections_connection_edit_save_credentials_shared_tooltip', '凭证将用于为所有访问用户自动连接数据库'], ['connections_connection_share_credentials', '分享凭证至团队'], ['connections_connection_share_credentials_tooltip', '凭证将用于为所有团队用户自动连接数据库'], ['connections_connection_credentials_provisioning', '认证凭据'], @@ -52,7 +49,7 @@ export default [ ['connections_connection_edit_search_hosts', '主机名称'], ['connections_connection_address', '地址'], ['connections_connection_folder', '文件夹'], - ['connections_connection_folder_validation', "文件夹名称不得包含以下符号 / : \" \\ ' <> | ? * 且不能以点开头"], + ['connections_connection_folder_validation', '文件夹名称不得包含以下符号 / : " \\ \' <> | ? * 且不能以点开头'], ['connections_connection_name', '连接名称'], ['connections_connection_access_admin_info', '管理员可以查看除其他用户的私有连接之外的所有连接。'], ['connections_connection_description', '描述'], @@ -95,4 +92,5 @@ export default [ ['core_connections_settings_disable', 'Disable'], ['core_connections_settings_disable_description', 'Disable the ability to create new connections'], + ['connections_templates_deprecated_message', 'Template connections are deprecated and will be removed in future releases'], ]; diff --git a/webapp/packages/core-theming/src/styles/_checkbox.scss b/webapp/packages/core-theming/src/styles/_checkbox.scss index 45f2d22161..16b4169927 100644 --- a/webapp/packages/core-theming/src/styles/_checkbox.scss +++ b/webapp/packages/core-theming/src/styles/_checkbox.scss @@ -19,7 +19,7 @@ $mdc-checkbox-icon-size: 16px; @extend .mdc-checkbox__native-control; &:disabled { - opacity: 0; + opacity: 0 !important; } } .theme-checkbox__background { diff --git a/webapp/packages/core-theming/src/styles/_form-controls.scss b/webapp/packages/core-theming/src/styles/_form-controls.scss index a029b59cf6..f188cd8d1f 100644 --- a/webapp/packages/core-theming/src/styles/_form-controls.scss +++ b/webapp/packages/core-theming/src/styles/_form-controls.scss @@ -73,26 +73,19 @@ @include mdc-theme-prop(border-color, primary, false); } - &:not([data-select='true'])[readonly] { + &:not([data-select='true'])[readonly], + &:not([data-select='true'])[disabled] { @include mdc-theme-prop(color, input-color-readonly, false); @include mdc-theme-prop(border-color, input-border-readonly, false); @include mdc-theme-prop(background-color, input-background-readonly, false); opacity: 1; + cursor: text; + pointer-events: all; &:-internal-autofill-selected, &:-internal-autofill-previewed { box-shadow: 0 0 0 50px $input-background-readonly inset; } } - &[disabled] { - @include mdc-theme-prop(color, input-color-disabled, false); - @include mdc-theme-prop(border-color, input-border-disabled, false); - @include mdc-theme-prop(background-color, input-background-disabled, false); - opacity: 1; - &:-internal-autofill-selected, - &:-internal-autofill-previewed { - box-shadow: 0 0 0 50px $input-background-disabled inset; - } - } &[data-embedded='true'] { &[disabled], &:not([data-select='true'])[readonly] { diff --git a/webapp/packages/core-theming/src/styles/_theme-dark.scss b/webapp/packages/core-theming/src/styles/_theme-dark.scss index f32bf4a177..836ecfcf19 100644 --- a/webapp/packages/core-theming/src/styles/_theme-dark.scss +++ b/webapp/packages/core-theming/src/styles/_theme-dark.scss @@ -34,9 +34,9 @@ $input-color-readonly: darken($input-color, 5%); $input-border: #585958; $input-border-disabled: darken($input-border, 10%); $input-border-readonly: darken($input-border, 5%); -$input-background: $mdc-theme-secondary; -$input-background-disabled: $input-background; -$input-background-readonly: $input-background; +$input-background: $mdc-theme-surface; +$input-background-disabled: #3e3e3e; +$input-background-readonly: #3e3e3e; $mdc-theme-text-colors: ( dark: ( diff --git a/webapp/packages/core-theming/src/styles/main/color.pure.scss b/webapp/packages/core-theming/src/styles/main/color.pure.scss index 402a43ecb9..c5f809292d 100644 --- a/webapp/packages/core-theming/src/styles/main/color.pure.scss +++ b/webapp/packages/core-theming/src/styles/main/color.pure.scss @@ -6,7 +6,8 @@ * you may not use this file except in compliance with the License. */ -:disabled, [aria-disabled="true"] { +:disabled, +[aria-disabled='true'] { pointer-events: none; cursor: default; opacity: 0.5; diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptions.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptions.tsx index 97082c6e5d..a7a4e82111 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptions.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/Teams/Options/TeamOptions.tsx @@ -23,13 +23,13 @@ export const TeamOptions: TabContainerPanelComponent = observer( return ( - + {translate('administration_teams_team_id')} - + {translate('administration_teams_team_name')} - diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx index 029371d619..ac13ee727f 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/Info/UserFormInfoCredentials.tsx @@ -54,7 +54,7 @@ export const UserFormInfoCredentials = observer(function UserFormInfoCred return ( {translate('authentication_user_credentials')} - + {translate('authentication_user_name')} {local && ( @@ -67,7 +67,7 @@ export const UserFormInfoCredentials = observer(function UserFormInfoCred autoComplete="new-password" placeholder={editing ? PASSWORD_PLACEHOLDER : ''} canShowPassword={tabState.state['password'] !== ''} - disabled={disabled} + readOnly={disabled} required={!editing} keepSize tiny @@ -79,7 +79,7 @@ export const UserFormInfoCredentials = observer(function UserFormInfoCred type="password" name="passwordRepeat" placeholder={editing ? PASSWORD_PLACEHOLDER : ''} - disabled={disabled} + readOnly={disabled} required={!editing} canShowPassword keepSize diff --git a/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx b/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx index 1cef309f13..d80bb3d3e0 100644 --- a/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx +++ b/webapp/packages/plugin-authentication/src/Dialog/AuthProviderForm/AuthProviderForm.tsx @@ -51,7 +51,7 @@ export const AuthProviderForm = observer(function AuthProviderForm({ prov type={parameter.encryption === 'none' ? 'text' : 'password'} name={parameter.id} state={credentials.credentials} - disabled={authenticate} + readOnly={authenticate} canShowPassword={false} autoComplete={`section-authentication section-${provider.id} ${configuration?.id ?? ''} ${parameter.id}`} > diff --git a/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialog.tsx b/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialog.tsx index 91cb00ceb3..d4c1b95155 100644 --- a/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialog.tsx +++ b/webapp/packages/plugin-connection-template/src/ConnectionDialog/ConnectionDialog.tsx @@ -14,6 +14,7 @@ import { CommonDialogWrapper, ErrorMessage, Form, + InfoItem, s, useAdministrationSettings, useErrorDetails, @@ -38,7 +39,12 @@ export const ConnectionDialog: DialogComponent = observer(function C const dialog = useConnectionDialog(rejectDialog); const errorDetails = useErrorDetails(dialog.connectException); - const subTitle = dialog.step === ConnectionStep.Connection ? dialog.template?.name : undefined; + const subTitle = + dialog.step === ConnectionStep.Connection ? ( + dialog.template?.name + ) : ( + + ); return ( diff --git a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministration.tsx b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministration.tsx index e98371c1aa..5472d94c7b 100644 --- a/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministration.tsx +++ b/webapp/packages/plugin-connections-administration/src/Administration/Connections/ConnectionsAdministration.tsx @@ -14,8 +14,8 @@ import { ExceptionMessageStyles, Group, GroupItem, - GroupSubTitle, GroupTitle, + InfoItem, Loader, s, SContext, @@ -25,13 +25,11 @@ import { useS, useTranslate, } from '@cloudbeaver/core-blocks'; -import { useService } from '@cloudbeaver/core-di'; import ConnectionsAdministrationStyle from './ConnectionsAdministration.module.css'; import { ConnectionsTable } from './ConnectionsTable/ConnectionsTable.js'; import { useConnectionsTable } from './ConnectionsTable/useConnectionsTable.js'; import { CreateConnection } from './CreateConnection/CreateConnection.js'; -import { CreateConnectionService } from './CreateConnectionService.js'; const registry: StyleRegistry = [ [ @@ -50,26 +48,16 @@ export const ConnectionsAdministration = observer - {translate('templates_administration_info_message')} + - - {translate('ui_add')} - this.serverConfigResource.distributed, + isHidden: () => this.serverConfigResource.distributed || !this.connectionInfoResource.values.some(connection => connection.template), getContentComponent: () => ConnectionsAdministration, getDrawerComponent: () => ConnectionsDrawerItem, onDeActivate: this.refreshUserConnections.bind(this), @@ -78,6 +78,10 @@ export class ConnectionsAdministrationService extends Bootstrap { this.connectionDetailsPlaceholder.add(SSH, 2); } + override async load(): Promise { + await this.connectionInfoResource.load(); + } + private async refreshUserConnections(configuration: boolean, outside: boolean, outsideAdminPage: boolean): Promise { // TODO: we have to track users' leaving the page if (outside) { diff --git a/webapp/packages/plugin-connections-administration/src/locales/en.ts b/webapp/packages/plugin-connections-administration/src/locales/en.ts index 3718ace448..ba1aed8728 100644 --- a/webapp/packages/plugin-connections-administration/src/locales/en.ts +++ b/webapp/packages/plugin-connections-administration/src/locales/en.ts @@ -13,9 +13,5 @@ export default [ ['plugin_connections_connection_edit_reconnect_failed', 'Failed to reconnect'], ['connections_administration_deactivate_message', "Your connection's settings will be lost. Do you want to continue?"], - [ - 'templates_administration_info_message', - 'The templates enable administrators to define various reusable connection parameters, subsequently allowing users to create multiple connections based on these templates.', - ], ['connections_administration_connection_create_error', 'Failed to create connection'], ]; diff --git a/webapp/packages/plugin-connections-administration/src/locales/fr.ts b/webapp/packages/plugin-connections-administration/src/locales/fr.ts index a70584acef..6efa32be67 100644 --- a/webapp/packages/plugin-connections-administration/src/locales/fr.ts +++ b/webapp/packages/plugin-connections-administration/src/locales/fr.ts @@ -13,9 +13,5 @@ export default [ ['plugin_connections_connection_edit_reconnect_failed', 'Échec de la reconnexion'], ['connections_administration_deactivate_message', 'Les paramètres de votre connexion seront perdus. Voulez-vous continuer ?'], - [ - 'templates_administration_info_message', - 'Les modèles permettent aux administrateurs de définir divers paramètres de connexion réutilisables, permettant ensuite aux utilisateurs de créer plusieurs connexions basées sur ces modèles.', - ], ['connections_administration_connection_create_error', 'Failed to create connection'], ]; diff --git a/webapp/packages/plugin-connections-administration/src/locales/it.ts b/webapp/packages/plugin-connections-administration/src/locales/it.ts index c1eea9c399..676b42db43 100644 --- a/webapp/packages/plugin-connections-administration/src/locales/it.ts +++ b/webapp/packages/plugin-connections-administration/src/locales/it.ts @@ -8,9 +8,5 @@ export default [ ['plugin_connections_connection_edit_menu_item_title', 'Modifica Connessione'], ['plugin_connections_connection_edit_cancel_title', "Conferma l'annullamento"], - [ - 'templates_administration_info_message', - 'The templates enable administrators to define various reusable connection parameters, subsequently allowing users to create multiple connections based on these templates.', - ], ['connections_administration_connection_create_error', 'Failed to create connection'], ]; diff --git a/webapp/packages/plugin-connections-administration/src/locales/ru.ts b/webapp/packages/plugin-connections-administration/src/locales/ru.ts index 3ffea2835b..d3691ed3af 100644 --- a/webapp/packages/plugin-connections-administration/src/locales/ru.ts +++ b/webapp/packages/plugin-connections-administration/src/locales/ru.ts @@ -13,9 +13,5 @@ export default [ ['plugin_connections_connection_edit_reconnect_failed', 'Не удалось переподключиться'], ['connections_administration_deactivate_message', 'Настройки вашего подключения будут потеряны. Вы хотите продолжить?'], - [ - 'templates_administration_info_message', - 'Шаблоны позволяют администраторам определять различные параметры подключения, а затем позволяют пользователям создавать несколько подключений на основе этих шаблонов.', - ], ['connections_administration_connection_create_error', 'Не удалось создать подключение'], ]; diff --git a/webapp/packages/plugin-connections-administration/src/locales/zh.ts b/webapp/packages/plugin-connections-administration/src/locales/zh.ts index 149fe0a2b0..eabd8240f1 100644 --- a/webapp/packages/plugin-connections-administration/src/locales/zh.ts +++ b/webapp/packages/plugin-connections-administration/src/locales/zh.ts @@ -13,6 +13,5 @@ export default [ ['plugin_connections_connection_edit_reconnect_failed', '重新连接失败'], ['connections_administration_deactivate_message', '您的连接设置将丢失。您要继续吗?'], - ['templates_administration_info_message', '管理员可在数据库连接模板中定义各种可重用的连接参数,之后用户可基于这些模板创建多个数据库连接。'], ['connections_administration_connection_create_error', 'Failed to create connection'], ]; diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx b/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx index d8cc310a91..a6f4298a67 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionAuthentication/NetworkHandlerAuthForm.tsx @@ -67,10 +67,10 @@ export const NetworkHandlerAuthForm = observer(function NetworkHandlerAut {ssh && ( <> - + {translate(`connections_network_handler_${id}_user`, 'connections_network_handler_default_user')} - + {passwordLabel} diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/AdvancedPropertiesForm.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/AdvancedPropertiesForm.tsx index 8db7be00af..a949a2ebd5 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/AdvancedPropertiesForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/AdvancedPropertiesForm.tsx @@ -35,8 +35,7 @@ export const AdvancedPropertiesForm = observer(function AdvancedPropertie min={0} max={MAX_KEEP_ALIVE_INTERVAL} name="keepAliveInterval" - disabled={disabled} - readOnly={readonly} + readOnly={readonly || disabled} title={translate('connections_connection_keep_alive_tooltip')} state={config} defaultState={DEFAULT_CONFIG} diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx index d95cd5fa7f..d37e416c24 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/Options.tsx @@ -216,8 +216,7 @@ export const Options: TabContainerPanelComponent = observe type="text" name="url" state={config} - disabled={disabled} - readOnly={readonly} + readOnly={readonly || disabled} autoComplete={`section-${config.driverId || 'driver'} section-jdbc`} > {translate('plugin_connections_connection_form_part_main_url_jdbc')} @@ -245,7 +244,7 @@ export const Options: TabContainerPanelComponent = observe - + {translate('connections_connection_name')} {!config.template && ( @@ -262,7 +261,6 @@ export const Options: TabContainerPanelComponent = observe type="text" name="folder" state={config} - disabled={disabled} autoComplete={`section-${config.driverId || 'driver'} section-folder`} autoHide readOnly @@ -273,7 +271,7 @@ export const Options: TabContainerPanelComponent = observe )} - diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx index a83cbc8810..1a557dc05b 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ParametersForm.tsx @@ -26,19 +26,19 @@ export const ParametersForm = observer(function ParametersForm({ config, {!embedded && ( - + {translate('plugin_connections_connection_form_part_main_custom_host')} - + {translate('plugin_connections_connection_form_part_main_custom_port')} )} - + {translate('plugin_connections_connection_form_part_main_custom_database')} {requiresServerName && ( - + {translate('plugin_connections_connection_form_part_main_custom_server_name')} )} diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx index c52f54f34c..93ca791def 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx @@ -109,10 +109,10 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st {translate('connections_network_handler_ssh_tunnel_auth_type')} - + {translate('connections_network_handler_ssh_tunnel_host')} - + {translate('connections_network_handler_ssh_tunnel_port')} @@ -121,8 +121,7 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st type="text" name="userName" state={handlerState} - disabled={disabled || !enabled} - readOnly={readonly} + readOnly={readonly || disabled || !enabled} required={handlerState.savePassword} tiny fill @@ -134,8 +133,7 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st name="password" autoComplete={isSafari ? 'section-connection-ssh-authentication section-ssh password' : 'new-password'} state={handlerState} - disabled={disabled || !enabled} - readOnly={readonly} + readOnly={readonly || disabled || !enabled} required={!passwordSaved && !keyAuth && handlerState.savePassword} description={passwordSaved ? translate('ui_processing_saved') : undefined} tiny @@ -171,8 +169,7 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st type="number" name="aliveInterval" state={handlerState.properties} - disabled={disabled || !enabled} - readOnly={readonly} + readOnly={readonly || disabled || !enabled} labelTooltip={aliveIntervalLabel} tiny > @@ -182,8 +179,7 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ st type="number" name="sshConnectTimeout" state={handlerState.properties} - disabled={disabled || !enabled} - readOnly={readonly} + readOnly={readonly || disabled || !enabled} labelTooltip={connectTimeoutLabel} tiny > diff --git a/webapp/packages/plugin-resource-manager-scripts/src/SaveScriptDialog.tsx b/webapp/packages/plugin-resource-manager-scripts/src/SaveScriptDialog.tsx index d31edfd3cc..daca09f857 100644 --- a/webapp/packages/plugin-resource-manager-scripts/src/SaveScriptDialog.tsx +++ b/webapp/packages/plugin-resource-manager-scripts/src/SaveScriptDialog.tsx @@ -115,7 +115,7 @@ export const SaveScriptDialog: DialogComponent name="name" state={state} error={!state.valid} - disabled={state.projectId === null} + readOnly={state.projectId === null} description={errorMessage} onChange={state.validate} > diff --git a/webapp/packages/plugin-settings-panel/src/SettingsPanel/Setting.tsx b/webapp/packages/plugin-settings-panel/src/SettingsPanel/Setting.tsx index aa9c6a5feb..de2095aca7 100644 --- a/webapp/packages/plugin-settings-panel/src/SettingsPanel/Setting.tsx +++ b/webapp/packages/plugin-settings-panel/src/SettingsPanel/Setting.tsx @@ -130,8 +130,7 @@ export const Setting = observer(function Setting({ source, setting }) { labelTooltip={description} value={value} description={description} - disabled={disabled} - readOnly={readOnly} + readOnly={readOnly || disabled} small onChange={handleChange} > diff --git a/webapp/packages/plugin-user-profile/src/UserProfileForm/UserAuthenticationPart/ChangePassword.tsx b/webapp/packages/plugin-user-profile/src/UserProfileForm/UserAuthenticationPart/ChangePassword.tsx index 8e9218414a..450929203f 100644 --- a/webapp/packages/plugin-user-profile/src/UserProfileForm/UserAuthenticationPart/ChangePassword.tsx +++ b/webapp/packages/plugin-user-profile/src/UserProfileForm/UserAuthenticationPart/ChangePassword.tsx @@ -35,7 +35,7 @@ export const ChangePassword = observer(function ChangePassword({ state, d type="password" name="oldPassword" state={state} - disabled={disabled} + readOnly={disabled} mapValue={(value?: string) => value?.trim() ?? ''} small required @@ -48,7 +48,7 @@ export const ChangePassword = observer(function ChangePassword({ state, d name="password" autoComplete="new-password" state={state} - disabled={disabled} + readOnly={disabled} mapValue={(value?: string) => value?.trim() ?? ''} small required @@ -60,7 +60,7 @@ export const ChangePassword = observer(function ChangePassword({ state, d type="password" name="repeatedPassword" state={state} - disabled={disabled} + readOnly={disabled} mapValue={(value?: string) => value?.trim() ?? ''} small required diff --git a/webapp/packages/plugin-user-profile/src/UserProfileForm/UserInfoPart/UserProfileFormInfo.tsx b/webapp/packages/plugin-user-profile/src/UserProfileForm/UserInfoPart/UserProfileFormInfo.tsx index fc1a71942d..1c2f1b3bef 100644 --- a/webapp/packages/plugin-user-profile/src/UserProfileForm/UserInfoPart/UserProfileFormInfo.tsx +++ b/webapp/packages/plugin-user-profile/src/UserProfileForm/UserInfoPart/UserProfileFormInfo.tsx @@ -30,13 +30,13 @@ export const UserProfileFormInfo: TabContainerPanelComponent {translate('plugin_user_profile_info')} - + {translate('plugin_user_profile_info_id')} - + {translate('plugin_user_profile_info_displayName')} - + {translate('authentication_user_role')}