仓库数据看板
This commit is contained in:
@@ -95,8 +95,11 @@ namespace ZR.Admin.WebApi.Extensions
|
||||
/// <returns></returns>
|
||||
public static bool IsAdmin(this HttpContext context)
|
||||
{
|
||||
List<string> roles = new();
|
||||
roles.Add($"{GlobalConstant.AdminRole}");
|
||||
roles.Add("杨琳磊");
|
||||
var userName = context.GetName();
|
||||
return userName == GlobalConstant.AdminRole;
|
||||
return roles.Contains(userName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user