fix 认证错误码

pull/2/head
lzp 2022-01-27 10:33:52 +08:00
parent 678e2def97
commit 8bcdb8600c
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.FORBIDDEN;
import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.UNAUTHORIZED; import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.UNAUTHORIZED;
/** /**
@ -36,7 +37,7 @@ public class AccessDeniedHandlerImpl implements AccessDeniedHandler {
log.warn("[commence][访问 URL({}) 时,用户({}) 权限不够]", request.getRequestURI(), log.warn("[commence][访问 URL({}) 时,用户({}) 权限不够]", request.getRequestURI(),
SecurityFrameworkUtils.getLoginUserId(), e); SecurityFrameworkUtils.getLoginUserId(), e);
// 返回 403 // 返回 403
ServletUtils.writeJSON(response, CommonResult.error(UNAUTHORIZED)); ServletUtils.writeJSON(response, CommonResult.error(FORBIDDEN));
} }
} }