diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java index 9aa2af4260..0579497f79 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java @@ -256,14 +256,6 @@ public class FunctionalCaseMinderService { return functionalMinderTreeDTO; } - private void checkPermission(List sourceIds, String tableName, String userId) { - if (CollectionUtils.isNotEmpty(sourceIds)) { - if (!extCheckOwnerMapper.checkoutOwner(tableName, userId, sourceIds)) { - throw new MSException(Translator.get(CHECK_OWNER_CASE)); - } - } - } - public void editFunctionalCaseBatch(FunctionalCaseMinderEditRequest request, String userId) { //处理删除的模块和用例和空白节点 deleteResource(request, userId); @@ -1127,7 +1119,6 @@ public class FunctionalCaseMinderService { List caseOptionDTOS = resourceMap.get(Translator.get("minder_extra_node.case")); if (CollectionUtils.isNotEmpty(caseOptionDTOS)) { List caseIds = caseOptionDTOS.stream().map(MinderOptionDTO::getId).toList(); - checkPermission(caseIds, FUNCTIONAL_CASE, userId); functionalCaseService.handDeleteFunctionalCase(caseIds, false, userId, request.getProjectId()); functionalCaseLogService.batchDeleteFunctionalCaseLogByIds(caseIds, "/functional/mind/case/edit"); functionalCaseNoticeService.batchSendNotice(request.getProjectId(), caseIds, user, NoticeConstants.Event.DELETE); @@ -1136,7 +1127,6 @@ public class FunctionalCaseMinderService { List caseModuleOptionDTOS = resourceMap.get(Translator.get("minder_extra_node.module")); if (CollectionUtils.isNotEmpty(caseModuleOptionDTOS)) { List moduleIds = caseModuleOptionDTOS.stream().map(MinderOptionDTO::getId).toList(); - checkPermission(moduleIds, FUNCTIONAL_CASE_MODULE, userId); List functionalCases = functionalCaseModuleService.deleteModuleByIds(moduleIds, new ArrayList<>(), userId); functionalCaseModuleService.batchDelLog(functionalCases, request.getProjectId()); functionalCaseNoticeService.batchSendNotice(request.getProjectId(), functionalCases.stream().map(FunctionalCase::getId).toList(), user, NoticeConstants.Event.DELETE);