From ad6e8abda8ad39ca1e38675194fd88bd6fe398e4 Mon Sep 17 00:00:00 2001 From: ky_yusj <2655568377@qq.com> Date: Sat, 8 May 2021 14:13:34 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=8E=B7=E5=8F=96json=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E7=9A=84=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Web.Core/Ewide.Web.Core.csproj | 1 + Api/Ewide.Web.Core/Handlers/JwtHandler.cs | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Api/Ewide.Web.Core/Ewide.Web.Core.csproj b/Api/Ewide.Web.Core/Ewide.Web.Core.csproj index 56c1ce3..0e1feae 100644 --- a/Api/Ewide.Web.Core/Ewide.Web.Core.csproj +++ b/Api/Ewide.Web.Core/Ewide.Web.Core.csproj @@ -12,6 +12,7 @@ + diff --git a/Api/Ewide.Web.Core/Handlers/JwtHandler.cs b/Api/Ewide.Web.Core/Handlers/JwtHandler.cs index 060d34e..4d3d3d2 100644 --- a/Api/Ewide.Web.Core/Handlers/JwtHandler.cs +++ b/Api/Ewide.Web.Core/Handlers/JwtHandler.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using System.Collections.Generic; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; namespace Ewide.Web.Core { @@ -48,7 +49,7 @@ 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("/", ":"); @@ -64,8 +65,8 @@ namespace Ewide.Web.Core "sysUser:updateInfo" }; - var a = App.Configuration["CoreSettings:DefalutRoute"]; - + var a = App.Configuration["CoreSettings:DefalutRoute:0"]; + var b = App.Configuration.GetSection("CoreSettings:DefalutRoute").Get(); if (defalutRoute.Contains(routeName)) return true; // 获取用户权限集合(按钮或API接口)