From c12ccf5558a84f4d5e49176555bac347943e28e8 Mon Sep 17 00:00:00 2001 From: ky_yusj <2655568377@qq.com> Date: Sat, 8 May 2021 15:01:38 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=BB=98=E8=AE=A4=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=BB=8E=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Web.Core/Handlers/JwtHandler.cs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Api/Ewide.Web.Core/Handlers/JwtHandler.cs b/Api/Ewide.Web.Core/Handlers/JwtHandler.cs index 4d3d3d2..443afe6 100644 --- a/Api/Ewide.Web.Core/Handlers/JwtHandler.cs +++ b/Api/Ewide.Web.Core/Handlers/JwtHandler.cs @@ -49,24 +49,23 @@ namespace Ewide.Web.Core { // 管理员跳过判断 var userManager = App.GetService(); - //if (userManager.SuperAdmin) return true; + if (userManager.SuperAdmin) return true; // 路由名称 var routeName = httpContext.Request.Path.Value.Substring(1).Replace("/", ":"); // 默认路由(获取登录用户信息) - var defalutRoute = new List() - { - "getLoginUser", - "logout", - "sysFileInfo:upload", - "sysFileInfo:download", - "sysFileInfo:preview", - "sysUser:updateInfo" - }; + var defalutRoute = App.Configuration.GetSection("CoreSettings:DefalutRoute").Get>(); + //var defalutRoute = new List() + //{ + // "getLoginUser", + // "logout", + // "sysFileInfo:upload", + // "sysFileInfo:download", + // "sysFileInfo:preview", + // "sysUser:updateInfo" + //}; - var a = App.Configuration["CoreSettings:DefalutRoute:0"]; - var b = App.Configuration.GetSection("CoreSettings:DefalutRoute").Get(); if (defalutRoute.Contains(routeName)) return true; // 获取用户权限集合(按钮或API接口)