From 7edb2bd7498307eeca7b8cd307e4349090b14984 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 18 Sep 2024 09:39:08 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-134241=20=E3=80=90=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E3=80=91FBP=E8=BF=9C=E7=A8=8B=E8=AE=BE=E8=AE=A1=E7=9A=84?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E5=9D=87=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=81=9A=E6=9D=83=E9=99=90=E6=A0=A1=E9=AA=8C=EF=BC=8C=E4=BB=BB?= =?UTF-8?q?=E6=84=8F=E7=94=A8=E6=88=B7=E5=9D=87=E5=8F=AF=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/PreferencePane.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 1779ef20c1..a12586e60a 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -231,6 +231,7 @@ public class PreferencePane extends BasicPane { private UICheckBox autoPushUpdateCheckBox; private UICheckBox imageCompressPanelCheckBox; private UICheckBox cloudAnalyticsDelayCheckBox; + private UICheckBox useRemoteAuthControlCheckBox; private UICheckBox vcsEnableCheckBox; private UICheckBox useVcsAutoSaveScheduleCheckBox; @@ -319,7 +320,9 @@ public class PreferencePane extends BasicPane { // 模板预览性能 cell(createTplPreviewPane()), // 设计器启动选项 - cell(createDesignerStartupPane()) + cell(createDesignerStartupPane()), + // 远程权限控制 + cell(createRemoteAuthControlPane()).with(it -> it.setVisible(WorkContext.getCurrent().isRoot())) ).weight(1).getComponent(); useUniverseDBMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_Universe_Database_Manager")); JPanel adviceScrollPane = patchScroll(advancePane); @@ -354,6 +357,12 @@ public class PreferencePane extends BasicPane { i18nText("Fine-Design_Startup_Option")); } + private Component createRemoteAuthControlPane() { + useRemoteAuthControlCheckBox = new UICheckBox(i18nText("Fine-Design_Use_Remote_Auth_Control")); + return FineUIUtils.wrapComponentWithTitle(column(10, cell(useRemoteAuthControlCheckBox)).getComponent(), + i18nText("Fine-Design_Use_Remote_Auth")); + } + private Component createTplPreviewPane() { imageCompressPanelCheckBox = new UICheckBox(i18nText("Fine-Design_Image_Compress")); return FineUIUtils.wrapComponentWithTitle(column(10, @@ -966,6 +975,9 @@ public class PreferencePane extends BasicPane { if (useOptimizedUPMCheckbox != null) { useOptimizedUPMCheckbox.setSelected(true); } + if (useRemoteAuthControlCheckBox != null) { + useRemoteAuthControlCheckBox.setSelected(ServerPreferenceConfig.getInstance().getUseRemoteAuthControl()); + } useUniverseDBMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseUniverseDBM()); @@ -1001,6 +1013,7 @@ public class PreferencePane extends BasicPane { this.cloudAnalyticsDelayCheckBox.setSelected(designerEnvManager.isCloudAnalyticsDelay()); this.startupPageEnabledCheckBox.setSelected(designerEnvManager.isStartupPageEnabled()); + this.useRemoteAuthControlCheckBox.setSelected(ServerPreferenceConfig.getInstance().getUseRemoteAuthControl()); } private int chooseCase(int sign) { @@ -1136,6 +1149,9 @@ public class PreferencePane extends BasicPane { if (useOptimizedUPMCheckbox != null) { ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected()); } + if (useRemoteAuthControlCheckBox != null) { + ServerPreferenceConfig.getInstance().setUseRemoteAuthControl(useRemoteAuthControlCheckBox.isSelected()); + } ServerPreferenceConfig.getInstance().setUseUniverseDBM(useUniverseDBMCheckbox.isSelected()); }