Browse Source

admin support delete process define

pull/2/head
qiaozhanwei 6 years ago
parent
commit
15ce0733df
  1. 3
      escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java

3
escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java

@ -24,6 +24,7 @@ import cn.escheduler.api.utils.PageInfo;
import cn.escheduler.common.enums.Flag; import cn.escheduler.common.enums.Flag;
import cn.escheduler.common.enums.ReleaseState; import cn.escheduler.common.enums.ReleaseState;
import cn.escheduler.common.enums.TaskType; import cn.escheduler.common.enums.TaskType;
import cn.escheduler.common.enums.UserType;
import cn.escheduler.common.graph.DAG; import cn.escheduler.common.graph.DAG;
import cn.escheduler.common.model.TaskNode; import cn.escheduler.common.model.TaskNode;
import cn.escheduler.common.model.TaskNodeRelation; import cn.escheduler.common.model.TaskNodeRelation;
@ -365,7 +366,7 @@ public class ProcessDefinitionService extends BaseDAGService {
} }
// Determine if the login user is the owner of the process definition // Determine if the login user is the owner of the process definition
if (loginUser.getId() != processDefinition.getUserId()) { if (loginUser.getId() != processDefinition.getUserId() && loginUser.getUserType() != UserType.ADMIN_USER) {
putMsg(result, Status.USER_NO_OPERATION_PERM); putMsg(result, Status.USER_NO_OPERATION_PERM);
return result; return result;
} }

Loading…
Cancel
Save