修复管理员判断问题

Uat_Study
hang 2022-04-13 14:09:06 +08:00
parent 123d417e92
commit 6944ca3049
2 changed files with 4 additions and 3 deletions

View File

@ -142,6 +142,7 @@ namespace IRaCIS.Core.Application
list.Insert(0, sysDocStat); list.Insert(0, sysDocStat);
trialDocStat.CurrentPageData = list; trialDocStat.CurrentPageData = list;
trialDocStat.TotalCount++;
return trialDocStat; return trialDocStat;
} }

View File

@ -143,11 +143,11 @@ namespace IRaCIS.Core.Domain.Share
{ {
get get
{ {
var userTypeIntStr = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.IsAdmin); var userType = _accessor?.HttpContext?.User?.FindFirst(JwtIRaCISClaimType.UserTypeEnumInt);
if (userTypeIntStr != null && !string.IsNullOrEmpty(userTypeIntStr.Value)) if (userType != null && !string.IsNullOrEmpty(userType.Value))
{ {
return userTypeIntStr.Value == true.ToString(); return int.Parse(userType.Value)==(int)UserTypeEnum.SuperAdmin;
} }
return false; return false;
} }