修改用户类型
parent
cc9807846e
commit
e237d58906
|
@ -1,86 +0,0 @@
|
||||||
using IRaCIS.Core.Application.Auth;
|
|
||||||
using IRaCIS.Core.Domain.Share;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.API
|
|
||||||
{
|
|
||||||
public static class AuthorizationPolicySetup
|
|
||||||
{
|
|
||||||
|
|
||||||
public static void AddAuthorizationPolicySetup(this IServiceCollection services, IConfiguration configuration)
|
|
||||||
{
|
|
||||||
services.AddAuthorization(options =>
|
|
||||||
{
|
|
||||||
//影像质控策略 只允许 CRC IQC进行操作
|
|
||||||
options.AddPolicy(IRaCISPolicy.CRC_IQC, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ClinicalResearchCoordinator).ToString(), ((int)UserTypeEnum.IQC).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
//一致性核查策略 只允许 CRC PM APM 进行操作
|
|
||||||
options.AddPolicy(IRaCISPolicy.PM_APM_CRC, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString(), ((int)UserTypeEnum.ClinicalResearchCoordinator).ToString(), ((int)UserTypeEnum.APM).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
options.AddPolicy(IRaCISPolicy.PM_APM, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString(), ((int)UserTypeEnum.APM).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
options.AddPolicy(IRaCISPolicy.PM_IQC, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString(), ((int)UserTypeEnum.IQC).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
options.AddPolicy(IRaCISPolicy.PM, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
options.AddPolicy(IRaCISPolicy.IQC, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.IQC).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
options.AddPolicy(IRaCISPolicy.CRC, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ClinicalResearchCoordinator).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
options.AddPolicy(IRaCISPolicy.PM_APM_CRC_QC, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString(),((int)UserTypeEnum.ClinicalResearchCoordinator).ToString(), ((int)UserTypeEnum.APM).ToString(), ((int)UserTypeEnum.IQC).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
options.AddPolicy(IRaCISPolicy.SPM_CPM, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.SPM).ToString(), ((int)UserTypeEnum.CPM).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
options.AddPolicy(IRaCISPolicy.PM_APM_SPM_CPM, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString(), ((int)UserTypeEnum.APM).ToString(),((int)UserTypeEnum.SPM).ToString(), ((int)UserTypeEnum.CPM).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
options.AddPolicy(IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM, policyBuilder =>
|
|
||||||
{
|
|
||||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString(), ((int)UserTypeEnum.APM).ToString(), ((int)UserTypeEnum.SPM).ToString(),
|
|
||||||
((int)UserTypeEnum.CPM).ToString(), ((int)UserTypeEnum.SMM).ToString(), ((int)UserTypeEnum.CMM).ToString());
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -21,11 +21,8 @@
|
||||||
"LoginMaxFailCount": 5,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes": 30
|
"LoginFailLockMinutes": 30
|
||||||
"OpenLoginLimit": false,
|
|
||||||
|
|
||||||
"LoginMaxFailCount": 5,
|
|
||||||
|
|
||||||
"LoginFailLockMinutes": 1
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
|
|
|
@ -2536,6 +2536,13 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.GetCRCBeConfirmList(IRaCIS.Core.Application.Service.Reading.Dto.GetCRCBeConfirmListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取CRC待确认列表
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.CRCConfirmClinical(IRaCIS.Core.Application.Service.Reading.Dto.CRCConfirmClinicalInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.CRCConfirmClinical(IRaCIS.Core.Application.Service.Reading.Dto.CRCConfirmClinicalInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
CRC 确认临床数据
|
CRC 确认临床数据
|
||||||
|
|
|
@ -113,13 +113,13 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
if (userTypeSelectEnum == UserTypeSelectEnum.ExternalUser)
|
if (userTypeSelectEnum == UserTypeSelectEnum.ExternalUser)
|
||||||
{
|
{
|
||||||
userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.CPM, UserTypeEnum.SPM, UserTypeEnum.CPM, UserTypeEnum.SMM, UserTypeEnum.CMM, UserTypeEnum.EA };
|
userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.CPM, UserTypeEnum.SPM, UserTypeEnum.CPM, };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (userTypeSelectEnum == UserTypeSelectEnum.InnerUser)
|
if (userTypeSelectEnum == UserTypeSelectEnum.InnerUser)
|
||||||
{
|
{
|
||||||
userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.IQC, UserTypeEnum.APM, UserTypeEnum.MIM, UserTypeEnum.QA ,UserTypeEnum.MW};
|
userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.IQC, UserTypeEnum.APM, UserTypeEnum.MIM, UserTypeEnum.QA ,};
|
||||||
|
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin)
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin)
|
||||||
{
|
{
|
||||||
|
@ -136,7 +136,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
if (userTypeSelectEnum == UserTypeSelectEnum.EnrollOrPD_EMailCopy)
|
if (userTypeSelectEnum == UserTypeSelectEnum.EnrollOrPD_EMailCopy)
|
||||||
{
|
{
|
||||||
userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.ProjectManager, UserTypeEnum.APM, UserTypeEnum.CPM, UserTypeEnum.SPM, UserTypeEnum.SMM, UserTypeEnum.CMM };
|
userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.ProjectManager, UserTypeEnum.APM, UserTypeEnum.CPM, UserTypeEnum.SPM };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var trialType = _trialRepository.Where(t => t.Id == trialUserQuery.TrialId).Select(t => t.TrialType).FirstOrDefault();
|
var trialType = _trialRepository.Where(t => t.Id == trialUserQuery.TrialId).Select(t => t.TrialType).FirstOrDefault();
|
||||||
|
|
||||||
var userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.IQC, UserTypeEnum.APM, UserTypeEnum.MIM, UserTypeEnum.QA, UserTypeEnum.MW };
|
var userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.IQC, UserTypeEnum.APM, UserTypeEnum.MIM, UserTypeEnum.QA };
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin)
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin)
|
||||||
{
|
{
|
||||||
userTypeEnums.Add(UserTypeEnum.ProjectManager);
|
userTypeEnums.Add(UserTypeEnum.ProjectManager);
|
||||||
|
|
|
@ -4,86 +4,84 @@
|
||||||
|
|
||||||
public enum UserTypeEnum
|
public enum UserTypeEnum
|
||||||
{
|
{
|
||||||
|
|
||||||
|
SuperAdmin = 1,
|
||||||
|
|
||||||
|
Admin = 2,
|
||||||
|
|
||||||
|
|
||||||
|
TA = 3,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//PM
|
//PM
|
||||||
ProjectManager=1,
|
ProjectManager = 4,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//CRC
|
//CRC
|
||||||
ClinicalResearchCoordinator=2,
|
ClinicalResearchCoordinator = 5,
|
||||||
|
|
||||||
|
CRA = 6,
|
||||||
|
|
||||||
//IQC
|
//IQC
|
||||||
IQC = 3,
|
IQC = 7,
|
||||||
|
|
||||||
|
|
||||||
////简历管理人员
|
|
||||||
//ResumeManager=4,
|
|
||||||
////简历运维人员
|
|
||||||
//ReviewerCoordinator = 5,
|
|
||||||
|
|
||||||
ReviewerCoordinator = 4,
|
PI = 8,
|
||||||
|
|
||||||
// 大屏展示
|
|
||||||
Dashboard = 6,
|
|
||||||
|
|
||||||
// 超级管理员用户类型,用于取代 SuperAdmin字段 数据库不内置这个用户类型和角色的配置,因为只允许有一个
|
SR = 9,
|
||||||
SuperAdmin=8,
|
|
||||||
|
MIM = 10,
|
||||||
|
|
||||||
|
|
||||||
|
IM = 11,
|
||||||
|
|
||||||
|
|
||||||
|
QA = 12,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CRA=9,
|
|
||||||
|
|
||||||
SPM=10,
|
|
||||||
|
|
||||||
APM=11,
|
|
||||||
|
|
||||||
CPM=12,
|
|
||||||
|
|
||||||
IndependentReviewer=13,
|
|
||||||
// 医学影像经理
|
|
||||||
MIM = 14,
|
|
||||||
|
|
||||||
|
|
||||||
QA=15,
|
|
||||||
|
|
||||||
EA=16,
|
SPM=20,
|
||||||
|
APM=21,
|
||||||
|
CPM=22,
|
||||||
|
|
||||||
MW=17,
|
IndependentReviewer=18,
|
||||||
|
|
||||||
|
AIR = 21,
|
||||||
SMM=18,
|
|
||||||
|
|
||||||
CMM=19,
|
|
||||||
|
|
||||||
|
|
||||||
AIR=21,
|
|
||||||
|
|
||||||
//医生用户类型暂不处理
|
//医生用户类型暂不处理
|
||||||
|
|
||||||
ShareImage = 125,
|
ShareImage = 125,
|
||||||
|
|
||||||
|
|
||||||
|
Undefined = 0
|
||||||
|
|
||||||
|
|
||||||
Undefined=0
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public enum UserTypeSelectEnum
|
public enum UserTypeSelectEnum
|
||||||
{
|
{
|
||||||
|
|
||||||
None=0,
|
None = 0,
|
||||||
|
|
||||||
ExternalUser=1,
|
ExternalUser = 1,
|
||||||
|
|
||||||
InnerUser=2,
|
InnerUser = 2,
|
||||||
|
|
||||||
SiteSurvey=3,
|
SiteSurvey = 3,
|
||||||
|
|
||||||
EnrollOrPD_EmailReceive=4,
|
EnrollOrPD_EmailReceive = 4,
|
||||||
EnrollOrPD_EMailCopy=5,
|
EnrollOrPD_EMailCopy = 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
public class UserType:Entity
|
public class UserType:Entity
|
||||||
{
|
{
|
||||||
//public Guid RoleId { get; set; }
|
|
||||||
//public List<TrialUser> TrialUserList { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public UserTypeEnum UserTypeEnum { get; set; }
|
public UserTypeEnum UserTypeEnum { get; set; }
|
||||||
|
|
||||||
public string UserTypeName { get; set; }
|
public string UserTypeName { get; set; }
|
||||||
|
@ -39,10 +35,5 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<User> UserList { get; set; }
|
public List<User> UserList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//public bool IsInternal { get; set; }
|
|
||||||
//public UserTypeGroup Type { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1860,7 +1860,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//确认重阅 区分用户类型
|
//确认重阅 区分用户类型
|
||||||
case "visittask/confirmrereading":
|
case "visittask/confirmrereading":
|
||||||
|
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||||
{
|
{
|
||||||
type = type + "/" + 1;
|
type = type + "/" + 1;
|
||||||
|
|
||||||
|
@ -2282,7 +2282,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
case "VisitTask/ConfirmReReading":
|
case "VisitTask/ConfirmReReading":
|
||||||
|
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager )
|
||||||
{
|
{
|
||||||
extraIdentification = "/" + 1;
|
extraIdentification = "/" + 1;
|
||||||
}
|
}
|
||||||
|
@ -2816,7 +2816,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//同意重阅
|
//同意重阅
|
||||||
case "VisitTask/ConfirmReReading":
|
case "VisitTask/ConfirmReReading":
|
||||||
|
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager )
|
||||||
{
|
{
|
||||||
type = type + "/" + 1;
|
type = type + "/" + 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue