修复管理员判断问题
parent
123d417e92
commit
6944ca3049
|
@ -142,6 +142,7 @@ namespace IRaCIS.Core.Application
|
|||
list.Insert(0, sysDocStat);
|
||||
|
||||
trialDocStat.CurrentPageData = list;
|
||||
trialDocStat.TotalCount++;
|
||||
return trialDocStat;
|
||||
}
|
||||
|
||||
|
|
|
@ -143,11 +143,11 @@ namespace IRaCIS.Core.Domain.Share
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue