更改权限
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
@@ -39,11 +38,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
[HttpPost("{trialId:guid}")]
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialSiteEquipmentSurvey(TrialSiteEquipmentSurveyAddOrEdit addOrEditTrialSiteEquipmentSurvey)
|
||||
{
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
|
||||
{
|
||||
return ResponseOutput.NotOk("CPM/APM 不允许操作");
|
||||
}
|
||||
|
||||
|
||||
if (addOrEditTrialSiteEquipmentSurvey.Id != null)
|
||||
{
|
||||
if (await _trialSiteEquipmentSurveyRepository.Where(t => t.Id == addOrEditTrialSiteEquipmentSurvey.Id).AnyAsync(t => t.TrialSiteSurvey.State==TrialSiteSurveyEnum.PMCreatedAndLock))
|
||||
@@ -63,11 +58,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
[HttpDelete("{trialSiteEquipmentSurveyId:guid}/{trialId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialSiteEquipmentSurvey(Guid trialSiteEquipmentSurveyId)
|
||||
{
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
|
||||
{
|
||||
return ResponseOutput.NotOk("CPM/APM 不允许操作");
|
||||
}
|
||||
|
||||
if (await _trialSiteEquipmentSurveyRepository.Where(t => t.Id == trialSiteEquipmentSurveyId).AnyAsync(t => t.TrialSiteSurvey.State==TrialSiteSurveyEnum.PMCreatedAndLock))
|
||||
{
|
||||
return ResponseOutput.NotOk("已锁定,不允许操作");
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
@@ -41,7 +39,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialSiteUserSurvey(TrialSiteUserSurveyAddOrEdit addOrEditTrialSiteUserSurvey)
|
||||
{
|
||||
|
||||
|
||||
if (await _trialSiteUserSurveyRepository.Where(t => t.Id == addOrEditTrialSiteUserSurvey.Id).AnyAsync(t => t.TrialSiteSurvey.State == TrialSiteSurveyEnum.PMCreatedAndLock))
|
||||
{
|
||||
return ResponseOutput.NotOk("已锁定,不允许操作");
|
||||
@@ -73,8 +70,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
[HttpDelete("{trialSiteUserSurveyId:guid}/{trialId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialSiteUserSurvey(Guid trialSiteUserSurveyId)
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
if (await _trialSiteUserSurveyRepository.Where(t => t.Id == trialSiteUserSurveyId).AnyAsync(t => t.TrialSiteSurvey.State == TrialSiteSurveyEnum.PMCreatedAndLock))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user