Browse Source

REPORT-26672 设计器和服务器都注册的lic都没有勾选远程设计功能点,还是可以远程连接

feature/big-screen
Hugh.C 5 years ago
parent
commit
f79198c2d7
  1. 11
      designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  2. 4
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java

11
designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -1,11 +1,13 @@
package com.fr.design.env;
import com.fr.log.FineLoggerFactory;
import com.fr.security.SecurityToolbox;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
import com.fr.workspace.engine.channel.http.FunctionalHttpRequest;
public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
@ -89,8 +91,13 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
@Override
public boolean checkValid(){
public boolean checkValid() {
try {
new FunctionalHttpRequest(this.connection).validateVT();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false;
}
return true;
}
}

4
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -17,6 +17,7 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.scrollruler.ModLineBorder;
import com.fr.license.exception.RegistEditionException;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.third.guava.base.Strings;
@ -564,6 +565,9 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
return TestConnectionResult.parse(WorkContext.getConnector().testConnection(connection), connection);
} catch (WorkspaceAuthException ignored) {
return AUTH_FAILED;
} catch (RegistEditionException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
throw e;
}
}

Loading…
Cancel
Save