:zap:角色管理优化
This commit is contained in:
@@ -82,10 +82,11 @@ namespace ZR.ServiceCore.Middleware
|
||||
if (!HasPermi && !Permission.Equals("common"))
|
||||
{
|
||||
logger.Info($"用户{info.UserName}没有权限访问{url},当前权限[{Permission}]");
|
||||
JsonResult result = new(new ApiResult((int)ResultCode.FORBIDDEN, $"你当前没有权限[{Permission}]访问,请联系管理员", url))
|
||||
JsonResult result = new(new ApiResult((int)ResultCode.FORBIDDEN, $"你当前没有权限访问,请联系管理员", url))
|
||||
{
|
||||
ContentType = "application/json",
|
||||
};
|
||||
context.HttpContext.Response.StatusCode = 403;
|
||||
context.Result = result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user