权限修改
parent
98aa1543d0
commit
7a6d68b313
|
@ -35,6 +35,12 @@ namespace IRaCIS.Core.API
|
|||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).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.PMAndAPM, policyBuilder =>
|
||||
//{
|
||||
// policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString(), ((int)UserTypeEnum.APM).ToString());
|
||||
|
|
|
@ -22,6 +22,8 @@ namespace IRaCIS.Core.Application.Auth
|
|||
|
||||
public const string IQC = "IQC";
|
||||
|
||||
public const string PM_APM_CRC_QC = "PM_APM_CRC_QC";
|
||||
|
||||
public const string SPMAndCPM = "SPMAndCPM";
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@ using IRaCIS.Application.Contracts;
|
|||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using IRaCIS.Core.Application.Auth;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -27,6 +28,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
[TrialAudit(AuditType.SubjectAudit, AuditOptType.AddOrUpdateSubject)]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC_QC)]
|
||||
public async Task<IResponseOutput<string>> AddOrUpdateSubject([FromBody] SubjectCommand subjectCommand)
|
||||
{
|
||||
var svlist = new List<SubjectVisit>();
|
||||
|
@ -89,6 +91,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
[HttpPut]
|
||||
[UnitOfWork]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC_QC)]
|
||||
public async Task<IResponseOutput> UpdateSubjectStatus(SubjectStatusChangeCommand subjectStatusChangeCommand)
|
||||
{
|
||||
await _subjectRepository.UpdateFromDTOAsync(subjectStatusChangeCommand, true);
|
||||
|
@ -99,6 +102,7 @@ namespace IRaCIS.Application.Services
|
|||
[HttpDelete("{trialId:guid}/{id:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
[UnitOfWork]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC)]
|
||||
public async Task<IResponseOutput> DeleteSubject(Guid id)
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue