| | |
| | | package com.moon.server.interceptor; |
| | | |
| | | import com.moon.server.entity.all.ResAuthEntity; |
| | | import com.moon.server.entity.all.StaticData; |
| | | import com.moon.server.entity.sys.TokenEntity; |
| | | import com.moon.server.entity.sys.UserEntity; |
| | | import com.moon.server.helper.StringHelper; |
| | | import com.moon.server.helper.WebHelper; |
| | | import com.moon.server.service.all.PermsService; |
| | | import com.moon.server.service.all.SysService; |
| | | import com.moon.server.service.sys.ResLogService; |
| | | |
| | |
| | | public class ProxyFilter implements Filter { |
| | | @Resource |
| | | private SysService sysService; |
| | | |
| | | @Resource |
| | | private PermsService permsService; |
| | | |
| | | @Resource |
| | | private ResLogService resLogService; |
| | |
| | | return te.getIp().equals(ip); |
| | | } |
| | | |
| | | private boolean checkPerms(int resId){ |
| | | |
| | | private boolean checkPerms(UserEntity ue, int resId){ |
| | | String uid = StaticData.ADMIN.equals(ue.getUid()) ? null : ue.getUid(); |
| | | List<ResAuthEntity> rs = permsService.selectRes(uid); |
| | | |
| | | return true; |
| | | } |