Browse Source

Merge pull request #6457 in DESIGN/design from release/11.0 to feature/x

* commit '1878786cf32551c2fae289aa3019e9002007f309':
  REPORT-61846 数据连接越权漏洞修复
feature/x
superman 3 years ago
parent
commit
db33f9d8e1
  1. 16
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

16
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -12,6 +12,7 @@ import com.fr.base.theme.ThemedTemplate;
import com.fr.base.vcs.DesignerMode;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig;
import com.fr.decision.config.FSConfig;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager;
@ -1594,8 +1595,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
}
private boolean saveRealFile() throws Exception {
JTemplateAuthorityChecker jTemplateAuthorityChecker = new JTemplateAuthorityChecker(this);
if (jTemplateAuthorityChecker.isAuthority()) {
if (checkJTemplateAuthority()) {
FILE editingFILE = this.getEditingFILE();
if (editingFILE == null || editingFILE instanceof MemFILE) {
return false;
@ -1603,6 +1603,18 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
export();
this.editingFILE = editingFILE;
return true;
} else {
return false;
}
}
private boolean checkJTemplateAuthority() {
if (!FSConfig.getInstance().getAuthorizeAttr().isDataConnectionAuthority()) {
return true;
}
JTemplateAuthorityChecker jTemplateAuthorityChecker = new JTemplateAuthorityChecker(this);
if (jTemplateAuthorityChecker.isAuthority()) {
return true;
} else {
jTemplateAuthorityChecker.showAuthorityFailPromptDialog();
return false;

Loading…
Cancel
Save