From 254cbfa01913f762970c65413ac8c4bcb5a357a4 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 21 Jun 2024 09:35:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B):=20?= =?UTF-8?q?=E8=84=91=E5=9B=BE=E5=A2=9E=E5=88=A0=E6=94=B9=E6=97=A0=E9=9C=80?= =?UTF-8?q?=E5=9C=A8=E9=80=BB=E8=BE=91=E4=BE=8B=E5=86=8D=E6=AC=A1=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/FunctionalCaseMinderService.java | 10 ---------- 1 file changed, 10 deletions(-) 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);