From f4555158f299d7b53eb34eeaea96a95dcb78ae29 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Tue, 3 Dec 2024 15:49:42 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E6=9D=83=E9=99=90=E6=A0=A1=E9=AA=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1208759358029824]工单步骤权限校验优化 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1208759358029824 --- .../handler/AutoexecOperateHandler.java | 10 +++-- .../AutoexecOperationAuthHandlerType.java | 45 ------------------- 2 files changed, 6 insertions(+), 49 deletions(-) delete mode 100644 src/main/java/neatlogic/module/autoexec/operationauth/handler/AutoexecOperationAuthHandlerType.java diff --git a/src/main/java/neatlogic/module/autoexec/operationauth/handler/AutoexecOperateHandler.java b/src/main/java/neatlogic/module/autoexec/operationauth/handler/AutoexecOperateHandler.java index 7135f636..a58c2a2d 100644 --- a/src/main/java/neatlogic/module/autoexec/operationauth/handler/AutoexecOperateHandler.java +++ b/src/main/java/neatlogic/module/autoexec/operationauth/handler/AutoexecOperateHandler.java @@ -22,8 +22,10 @@ import neatlogic.framework.process.dto.ProcessTaskStepVo; import neatlogic.framework.process.dto.ProcessTaskVo; import neatlogic.framework.process.exception.operationauth.ProcessTaskPermissionDeniedException; import neatlogic.framework.process.operationauth.core.OperationAuthHandlerBase; +import neatlogic.framework.process.operationauth.core.PredicateResult; import neatlogic.framework.process.operationauth.core.TernaryPredicate; import neatlogic.module.autoexec.operationauth.exception.ProcessTaskAutoexecHandlerNotEnableOperateException; +import neatlogic.module.autoexec.process.constvalue.CreateJobProcessStepHandlerType; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; @@ -57,7 +59,7 @@ public class AutoexecOperateHandler extends OperationAuthHandlerBase { //1.提示“自动化节点不支持'撤回'操作”; operationTypePermissionDeniedExceptionMap.computeIfAbsent(id, key -> new HashMap<>()) .put(operationType, new ProcessTaskAutoexecHandlerNotEnableOperateException(operationType.getText())); - return false; + return PredicateResult.DENY; }); // operationBiPredicateMap.put(ProcessTaskOperationType.STEP_ACCEPT, // (processTaskVo, processTaskStepVo, userUuid, operationTypePermissionDeniedExceptionMap) -> { @@ -75,7 +77,7 @@ public class AutoexecOperateHandler extends OperationAuthHandlerBase { //1.提示“自动化节点不支持'处理'操作”; operationTypePermissionDeniedExceptionMap.computeIfAbsent(id, key -> new HashMap<>()) .put(operationType, new ProcessTaskAutoexecHandlerNotEnableOperateException(operationType.getText())); - return false; + return PredicateResult.DENY; }); operationBiPredicateMap.put(ProcessTaskStepOperationType.STEP_COMMENT, (processTaskVo, processTaskStepVo, userUuid, operationTypePermissionDeniedExceptionMap, extraParam) -> { @@ -84,7 +86,7 @@ public class AutoexecOperateHandler extends OperationAuthHandlerBase { //1.提示“自动化节点不支持'回复'操作”; operationTypePermissionDeniedExceptionMap.computeIfAbsent(id, key -> new HashMap<>()) .put(operationType, new ProcessTaskAutoexecHandlerNotEnableOperateException(operationType.getText())); - return false; + return PredicateResult.DENY; }); // operationBiPredicateMap.put(ProcessTaskOperationType.STEP_COMPLETE, @@ -120,6 +122,6 @@ public class AutoexecOperateHandler extends OperationAuthHandlerBase { @Override public String getHandler() { - return AutoexecOperationAuthHandlerType.AUTOEXEC.getValue(); + return CreateJobProcessStepHandlerType.CREATE_JOB.getHandler(); } } diff --git a/src/main/java/neatlogic/module/autoexec/operationauth/handler/AutoexecOperationAuthHandlerType.java b/src/main/java/neatlogic/module/autoexec/operationauth/handler/AutoexecOperationAuthHandlerType.java deleted file mode 100644 index 436c90c4..00000000 --- a/src/main/java/neatlogic/module/autoexec/operationauth/handler/AutoexecOperationAuthHandlerType.java +++ /dev/null @@ -1,45 +0,0 @@ -/*Copyright (C) $today.year 深圳极向量科技有限公司 All Rights Reserved. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see .*/ - -package neatlogic.module.autoexec.operationauth.handler; - -import neatlogic.framework.process.operationauth.core.IOperationAuthHandlerType; -import neatlogic.framework.util.$; - -/** - * @author linbq - * @since 2021/9/8 17:50 - **/ -public enum AutoexecOperationAuthHandlerType implements IOperationAuthHandlerType { - AUTOEXEC("autoexec", "自动化"); - - AutoexecOperationAuthHandlerType(String value, String text){ - this.value = value; - this.text = text; - } - - private String value; - private String text; - - @Override - public String getValue() { - return value; - } - - @Override - public String getText() { - return $.t(text); - } -} -- Gitee