| | |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | Map<String, SysFunction> userFunction = WebUtil.getSessionAttribute(USERFUNCTION); |
| | | |
| | | |
| | | // 企业管理员不校验按钮权限 |
| | | if (AppConstance.USER_TYPE_DEVELOPER.equals(user.getSuUserType()) |
| | | || AppConstance.USER_TYPE_SUPER.equals(user.getSuUserType()) |
| | | || AppConstance.USER_TYPE_ADMIN.equals(user.getSuUserType())) { |
| | | return true; |
| | | } |
| | | |
| | | if (userFunction == null) { |
| | | return false; |
| | | } else { |
| | | |
| | | String[] strs = matchStr.split("-"); |
| | | if (strs.length != DEFAULT_2) { |
| | | throw new IllegalArgumentException("权限matchStr格式错误,需要fnCode:btnValue"); |
| | |
| | | } else { |
| | | return StringUtils.isContentSet(strs[1].trim(), fn.getRpfBns()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | return true; |
| | | } |
| | | Map<String, SysFunction> userFunction = WebUtil.getSessionAttribute(USERFUNCTION); |
| | | if (userFunction == null) { |
| | | return false; |
| | | } else { |
| | | SysFunction fn = userFunction.get(fnCode); |
| | | return fn == null ? false : true; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 初始化用户权限 |
| | | * |