From d6508e670b49fc46e92ff1bc295d8debd63aaf2e Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 10 Sep 2024 16:32:02 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-133535=20=E3=80=90fr-fbp=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E3=80=91=E6=A8=A1=E6=9D=BF=E5=86=85=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E9=89=B4=E6=9D=83=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authority/JTemplateAuthorityChecker.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/authority/JTemplateAuthorityChecker.java b/designer-base/src/main/java/com/fr/design/mainframe/authority/JTemplateAuthorityChecker.java index a0ed56876d..c0d6247905 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/authority/JTemplateAuthorityChecker.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/authority/JTemplateAuthorityChecker.java @@ -29,9 +29,7 @@ import static javax.swing.JOptionPane.WARNING_MESSAGE; public class JTemplateAuthorityChecker { JTemplate jTemplate; - Set allConnectionNames; Set authConnectionNames; - Set allDatasetNames; Set authDatasetNames; Map checkerMap = new HashMap<>(); Set authFailConnectionNames = new HashSet<>(); @@ -47,13 +45,7 @@ public class JTemplateAuthorityChecker { } private void initAuthNames() { - allDatasetNames = new HashSet<>(); - for (String authServerDataSetName : TableDataConfigProviderFactory.getInstance().getTableDatas().keySet()) { - allDatasetNames.add(authServerDataSetName); - } - - allConnectionNames = ConnectionConfigProviderFactory.getConfigProvider().getConnections().keySet(); - + // 无需获取所有数据集和数据连接了,当前只能获取自己有权限的 Map> authNamesMap = RemoteAuthorityRepository.getInstance().getAuthServerDataSetAndConnectionNames(WorkContext.getCurrent().getConnection().getUserName()); if (authNamesMap != null) { //有权限的数据连接名称 @@ -95,8 +87,6 @@ public class JTemplateAuthorityChecker { } } } - authFailConnectionNames.retainAll(allConnectionNames); - authFailDatasetNames.retainAll(allDatasetNames); FineLoggerFactory.getLogger().info("JTemplateAuthorityChecker check time consume:" + (System.currentTimeMillis() - s)); return authFailConnectionNames.size() == 0 && authFailDatasetNames.size() == 0; }