|
|
@ -6,6 +6,7 @@ using Myshipping.Core.Service;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
using Furion.Logging;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Myshipping.Web.Core;
|
|
|
|
namespace Myshipping.Web.Core;
|
|
|
|
|
|
|
|
|
|
|
@ -51,6 +52,9 @@ public class JwtHandler : AppAuthorizeHandler
|
|
|
|
// 路由名称
|
|
|
|
// 路由名称
|
|
|
|
var routeName = httpContext.Request.Path.Value.Substring(1).Replace("/", ":");
|
|
|
|
var routeName = httpContext.Request.Path.Value.Substring(1).Replace("/", ":");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//字典数据前端需要,允许获取
|
|
|
|
|
|
|
|
if (routeName == "sysDictData:frontList") return true;
|
|
|
|
|
|
|
|
|
|
|
|
var allPermission = await App.GetService<ISysMenuService>().GetAllPermission();
|
|
|
|
var allPermission = await App.GetService<ISysMenuService>().GetAllPermission();
|
|
|
|
|
|
|
|
|
|
|
|
if (!allPermission.Contains(routeName))
|
|
|
|
if (!allPermission.Contains(routeName))
|
|
|
|