Commit bb80fa18 by guojuxing

权限拦截代码完善

parent 8a9d2c86
......@@ -46,6 +46,9 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
}
//判断是否有权限的路径
UserDetail userDetail = UserDetailUtils.getUserDetail();
if (userDetail == null || userDetail.getUserInfo() == null) {
throw new CommonException(ErrorCode.SYSTEM_ERROR.getErrorCode(), "登录信息不存在,请重新登录");
}
if (userDetail.getUserInfo().getSuperAdmin().intValue() == 1) {
//超级管理员不限制
return true;
......
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