update 获取json配置文件的数组
This commit is contained in:
@@ -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<IUserManager>();
|
||||
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<string[]>();
|
||||
if (defalutRoute.Contains(routeName)) return true;
|
||||
|
||||
// 获取用户权限集合(按钮或API接口)
|
||||
|
||||
Reference in New Issue
Block a user