菜单设置
This commit is contained in:
@@ -42,11 +42,12 @@ namespace ZR.Admin.WebApi.Filters
|
||||
var isAuthed = context.HttpContext.User.Identity.IsAuthenticated;
|
||||
|
||||
//使用jwt token校验2020-11-21
|
||||
//todo 认证是否合法用户和校验
|
||||
LoginUser info = JwtUtil.GetLoginUser(context.HttpContext);
|
||||
|
||||
if (info == null || !isAuthed)
|
||||
{
|
||||
string msg = $"请求访问[{url}]失败,无法访问系统资源";
|
||||
string msg = $"非法用户 请求访问[{url}]失败,无法访问系统资源";
|
||||
logger.Info($"{msg}");
|
||||
|
||||
context.Result = new JsonResult(new ApiResult((int)ResultCode.DENY, msg));
|
||||
|
||||
Reference in New Issue
Block a user