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 7308859137..a0ed56876d 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 @@ -13,6 +13,7 @@ import com.fr.design.mainframe.JTemplate; import com.fr.log.FineLoggerFactory; import com.fr.workspace.WorkContext; import com.fr.workspace.server.authority.user.UserAuthority; +import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository; import java.util.ArrayList; @@ -53,8 +54,7 @@ public class JTemplateAuthorityChecker { allConnectionNames = ConnectionConfigProviderFactory.getConfigProvider().getConnections().keySet(); - UserAuthority templateAuthority = WorkContext.getCurrent().get(UserAuthority.class); - Map> authNamesMap = templateAuthority.getAuthServerDataSetAndConnectionNames(); + Map> authNamesMap = RemoteAuthorityRepository.getInstance().getAuthServerDataSetAndConnectionNames(WorkContext.getCurrent().getConnection().getUserName()); if (authNamesMap != null) { //有权限的数据连接名称 authConnectionNames = authNamesMap.get(UserAuthority.AUTH_CONNECTION_NAMES);