update 默认路由改为从配置文件读取
This commit is contained in:
@@ -49,24 +49,23 @@ 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("/", ":");
|
||||
|
||||
// 默认路由(获取登录用户信息)
|
||||
var defalutRoute = new List<string>()
|
||||
{
|
||||
"getLoginUser",
|
||||
"logout",
|
||||
"sysFileInfo:upload",
|
||||
"sysFileInfo:download",
|
||||
"sysFileInfo:preview",
|
||||
"sysUser:updateInfo"
|
||||
};
|
||||
var defalutRoute = App.Configuration.GetSection("CoreSettings:DefalutRoute").Get<List<string>>();
|
||||
//var defalutRoute = new List<string>()
|
||||
//{
|
||||
// "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<string[]>();
|
||||
if (defalutRoute.Contains(routeName)) return true;
|
||||
|
||||
// 获取用户权限集合(按钮或API接口)
|
||||
|
||||
Reference in New Issue
Block a user