Commit 9826b8c8 by guojuxing

用户路由权限

parent 417f6555
......@@ -20,7 +20,8 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
private static final Logger log = LogManager.getLogger(AuthInterceptor.class);
private String[] ignoreURI = new String[] { "/gic-auth-web/login", "/gic-auth-web/logout", "/gic-auth-web/list-enterprise-by-phone"};
private String[] ignoreURI = new String[] { "/gic-auth-web/login", "/gic-auth-web/logout", "/gic-auth-web/list-enterprise-by-phone",
"/gic-auth-web/login-user-menu", "/gic-auth-web/login-user-operation-item"};
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {
......@@ -40,8 +41,7 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
//判断是否有权限的路径
UserDetail userDetail = UserDetailUtils.getUserDetail();
Map<String, Object> menuUrlMap = userDetail.getMenuUrlMap();
if (menuUrlMap == null) {
if (menuUrlMap == null || menuUrlMap.isEmpty()) {
throw new CommonException(ErrorCode.SYSTEM_ERROR.getErrorCode(), "sorry,您无该页面的访问权限,请联系超级管理员!");
}
if (!menuUrlMap.containsKey(uri)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment