仓库数据看板

This commit is contained in:
2024-08-14 14:58:48 +08:00
parent 79504bf4c3
commit 5b3b6f6fbb
6 changed files with 337 additions and 2 deletions

View File

@@ -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>