APP数据过滤修复;Xmpp注释掉列表的权限

This commit is contained in:
wangxin
2018-07-13 17:11:15 +08:00
parent 6f3935d8cb
commit 7248fff6a5
3 changed files with 17 additions and 10 deletions

View File

@@ -42,7 +42,7 @@ import com.nis.web.security.UserUtils;
@RequestMapping("${adminPath}/ntc/other") @RequestMapping("${adminPath}/ntc/other")
public class XmppController extends BaseController { public class XmppController extends BaseController {
@RequestMapping(value = {"xmppList"}) @RequestMapping(value = {"xmppList"})
@RequiresPermissions(value={"other:xmpp:config","other:xmpp:confirm"},logical=Logical.OR) //@RequiresPermissions(value={"other:xmpp:config","other:xmpp:confirm"},logical=Logical.OR)
public String list(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { public String list(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a"); Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
Page<CfgIndexInfo> page = xmppCfgService.getXmppList(searchPage, cfg); Page<CfgIndexInfo> page = xmppCfgService.getXmppList(searchPage, cfg);

View File

@@ -459,7 +459,9 @@
</if> </if>
</where> </where>
) )
</if> </if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim> </trim>
<choose> <choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''"> <when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -580,7 +582,8 @@
<if test="areaEffectiveIds != null and areaEffectiveIds != ''"> <if test="areaEffectiveIds != null and areaEffectiveIds != ''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%') AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if> </if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim> </trim>
<choose> <choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''"> <when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -680,7 +683,8 @@
<if test="areaEffectiveIds != null and areaEffectiveIds != ''"> <if test="areaEffectiveIds != null and areaEffectiveIds != ''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%') AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if> </if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim> </trim>
<choose> <choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''"> <when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -776,7 +780,8 @@
<if test="areaEffectiveIds != null and areaEffectiveIds != ''"> <if test="areaEffectiveIds != null and areaEffectiveIds != ''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%') AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if> </if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim> </trim>
<choose> <choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''"> <when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -872,6 +877,8 @@
<if test="areaEffectiveIds != null and areaEffectiveIds != ''"> <if test="areaEffectiveIds != null and areaEffectiveIds != ''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%') AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if> </if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim> </trim>
<choose> <choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''"> <when test="page !=null and page.orderBy != null and page.orderBy != ''">

View File

@@ -50,35 +50,35 @@ public class AppCfgService extends BaseService {
protected AreaIpCfgDao areaIpCfgDao; protected AreaIpCfgDao areaIpCfgDao;
public Page<AppPolicyCfg> findAppPolicyList(Page<AppPolicyCfg> page, AppPolicyCfg entity) { public Page<AppPolicyCfg> findAppPolicyList(Page<AppPolicyCfg> page, AppPolicyCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
entity.setPage(page); entity.setPage(page);
List<AppPolicyCfg> list = appCfgDao.findAppPolicyList(entity); List<AppPolicyCfg> list = appCfgDao.findAppPolicyList(entity);
page.setList(list); page.setList(list);
return page; return page;
} }
public Page<AppIpCfg> findAppIpList(Page<AppIpCfg> page, AppIpCfg entity) { public Page<AppIpCfg> findAppIpList(Page<AppIpCfg> page, AppIpCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
entity.setPage(page); entity.setPage(page);
List<AppIpCfg> list = appCfgDao.findAppIpList(entity); List<AppIpCfg> list = appCfgDao.findAppIpList(entity);
page.setList(list); page.setList(list);
return page; return page;
} }
public Page<AppHttpCfg> findAppHttpList(Page<AppHttpCfg> page, AppHttpCfg entity) { public Page<AppHttpCfg> findAppHttpList(Page<AppHttpCfg> page, AppHttpCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
entity.setPage(page); entity.setPage(page);
List<AppHttpCfg> list = appCfgDao.findAppHttpList(entity); List<AppHttpCfg> list = appCfgDao.findAppHttpList(entity);
page.setList(list); page.setList(list);
return page; return page;
} }
public Page<AppDomainCfg> findAppDomainList(Page<AppDomainCfg> page, AppDomainCfg entity) { public Page<AppDomainCfg> findAppDomainList(Page<AppDomainCfg> page, AppDomainCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
entity.setPage(page); entity.setPage(page);
List<AppDomainCfg> list = appCfgDao.findAppDomainList(entity); List<AppDomainCfg> list = appCfgDao.findAppDomainList(entity);
page.setList(list); page.setList(list);
return page; return page;
} }
public Page<AppByteCfg> findAppByteList(Page<AppByteCfg> page, AppByteCfg entity) { public Page<AppByteCfg> findAppByteList(Page<AppByteCfg> page, AppByteCfg entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a")); entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
entity.setPage(page); entity.setPage(page);
List<AppByteCfg> list = appCfgDao.findAppByteList(entity); List<AppByteCfg> list = appCfgDao.findAppByteList(entity);
page.setList(list); page.setList(list);