| | |
| | | if (null == ue) { |
| | | return; |
| | | } |
| | | if (!check(req, res, ue, token)) { |
| | | return; |
| | | } |
| | | |
| | | // 9.获取资源实体 |
| | | ResEntity entity = getResEntity(ue, resId); |
| | | if (null == entity) { |
| | | if (null == entity || entity.getType() != 3|| StringHelper.isNull(entity.getProxy())||StringHelper.isNull(entity.getUrl())) { |
| | | WebHelper.writeStr2Page(res, ILLEGAL_RESOURCE); |
| | | return; |
| | | } |
| | |
| | | */ |
| | | private ResEntity getResEntity(UserEntity ue, int resId) { |
| | | String uid = StaticData.ADMIN.equals(ue.getUid()) ? null : ue.getUid(); |
| | | List<ResEntity> rs = permsService.selectResList(uid); |
| | | List<ResEntity> rs = permsService.selectRes(uid); |
| | | if (null == rs || rs.isEmpty()) { |
| | | return null; |
| | | } |