|
|
|
@ -13,12 +13,12 @@ namespace Myshipping.Web.Core;
|
|
|
|
|
|
|
|
|
|
public class JwtHandler : AppAuthorizeHandler
|
|
|
|
|
{
|
|
|
|
|
//private ISysMenuService _sysMenuService;
|
|
|
|
|
private ISysMenuService _sysMenuService;
|
|
|
|
|
|
|
|
|
|
//public JwtHandler(ISysMenuService sysMenuService)
|
|
|
|
|
//{
|
|
|
|
|
// _sysMenuService = sysMenuService;
|
|
|
|
|
//}
|
|
|
|
|
public JwtHandler(ISysMenuService sysMenuService)
|
|
|
|
|
{
|
|
|
|
|
_sysMenuService = sysMenuService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -71,7 +71,7 @@ public class JwtHandler : AppAuthorizeHandler
|
|
|
|
|
if (routeName == "sysUser:updatePwd") return true;
|
|
|
|
|
|
|
|
|
|
Stopwatch sw = Stopwatch.StartNew();
|
|
|
|
|
var _sysMenuService = App.GetService<ISysMenuService>();
|
|
|
|
|
//var _sysMenuService = App.GetService<ISysMenuService>();
|
|
|
|
|
var allPermission = await _sysMenuService.GetAllPermission();
|
|
|
|
|
httpContext.Response.Headers["CheckTimeCheckAuthorzie1"] = sw.ElapsedMilliseconds.ToString();
|
|
|
|
|
if (!allPermission.Contains(routeName))
|
|
|
|
|