Browse Source

Pull request #14863: REPORT-134415 【fr-fbp回归】hive平台和设计器 数据连接类型不一致 & REPORT-134241 【安全】FBP远程设计的相关接口均没有做权限校验,任意用户均可访问

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp/release to fbp/release

* commit '1aa1bf3a51b0caf5ae34282b77d679bd7069f3ea':
  REPORT-134241 【安全】FBP远程设计的相关接口均没有做权限校验,任意用户均可访问
  REPORT-134241 【安全】FBP远程设计的相关接口均没有做权限校验,任意用户均可访问
  REPORT-134415 【fr-fbp回归】hive平台和设计器 数据连接类型不一致
fbp/release
Destiny.Lin-林锦龙 2 months ago
parent
commit
47ce86c29a
  1. 11
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

11
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -173,14 +173,15 @@ public class JDBCDefPane extends JPanel {
urlTextField.setText(dus[i].getURL());
}
}
// 更改数据库类型后 数据库名称置空和之前逻辑保持一致
if (needRefresh) {
jdbcDatabase.setDatabase(StringUtils.EMPTY);
// 更改数据库类型后更新数据库名称
if (needRefresh || StringUtils.isEmpty(jdbcDatabase.getDatabase())) {
jdbcDatabase.setDatabase(dbTypeMap.getOrDefault(GeneralUtils.objectToString(dbtypeComboBox.getSelectedItem()), DefaultDatabaseType.OTHER.getType()));
}
jdbcDatabase.setDatabase(dbTypeMap.getOrDefault(GeneralUtils.objectToString(dbtypeComboBox.getSelectedItem()), DefaultDatabaseType.OTHER.getType()));
changePane(dbtypeComboBox.getSelectedItem());
JDBCConnectionDef.getInstance().setConnection((String) dbtypeComboBox.getSelectedItem(), jdbcDatabase);
DatabaseConnectionPane.JDBC.getAdvancedAttrPane().populate(jdbcDatabase);
needRefresh = true;
}
};
private HashBiMap<String, String> nameAndRepresent;
@ -414,6 +415,7 @@ public class JDBCDefPane extends JPanel {
DriverURLName[] dus = entry.getValue();
for (int i = 0, len = dus.length; i < len; i++) {
if (ComparatorUtils.equals(dus[i].getDriver(), jdbcDatabase.getDriver())) {
needRefresh = false;
this.dbtypeComboBox.setSelectedItem(entry.getKey());
out = true;
break;
@ -454,7 +456,6 @@ public class JDBCDefPane extends JPanel {
} else {
this.charSetComboBox.setSelectedItem(jdbcDatabase.getOriginalCharsetName());
}
needRefresh = false;
}
public JDBCDatabaseConnection update() {

Loading…
Cancel
Save