jyy
2021-07-10 870960399814cff73d1e6ef93fccb11bede8d464
zq-erp/src/main/java/com/matrix/system/common/authority/DefaultAuthorityManager.java
@@ -79,12 +79,19 @@
        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");
@@ -97,6 +104,8 @@
        } else {
            return StringUtils.isContentSet(strs[1].trim(), fn.getRpfBns());
        }
        }
    }
    /**
@@ -113,10 +122,15 @@
            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;
    }
    }
    /**
     * 初始化用户权限
     *