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