fix(core-connections): CB-1168 check ssh password for changes

This commit is contained in:
Naumov Alexey
2021-09-29 13:28:06 +03:00
parent ddf946cd24
commit afdfc3679f
2 changed files with 11 additions and 10 deletions
@@ -191,15 +191,17 @@ export class ConnectionSSHTabService extends Bootstrap {
const port = Number(initialConfig?.properties?.port);
const formPort = Number(handler.properties?.port);
const passwordChanged = (
(((initialConfig?.password === null && handler.password !== null) || initialConfig?.password === '') && handler.password !== '')
|| !!handler.password?.length
);
if (handler.enabled !== initialConfig?.enabled
|| handler.savePassword !== initialConfig?.savePassword
|| handler.userName !== initialConfig?.userName
|| (
((initialConfig?.password === null || initialConfig?.password === '') && handler.password !== '')
|| (handler.password?.length || 0) > 0
)
|| handler.properties?.host !== initialConfig?.properties?.host
|| port !== formPort) {
|| handler.savePassword !== initialConfig?.savePassword
|| handler.userName !== initialConfig?.userName
|| passwordChanged
|| handler.properties?.host !== initialConfig?.properties?.host
|| port !== formPort) {
return true;
}
@@ -8,8 +8,7 @@
import { observer } from 'mobx-react-lite';
import { useCallback } from 'react';
import styled from 'reshadow';
import { css } from 'reshadow';
import styled, { css } from 'reshadow';
import { Loader } from '@cloudbeaver/core-blocks';
import { ConnectionForm } from '@cloudbeaver/core-connections';