|
|
|
@ -19,7 +19,6 @@ package org.apache.dolphinscheduler.api.service.impl;
|
|
|
|
|
|
|
|
|
|
import static java.util.stream.Collectors.toSet; |
|
|
|
|
import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.TASK_DEFINITION_MOVE; |
|
|
|
|
import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.VERSION_DELETE; |
|
|
|
|
import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.VERSION_LIST; |
|
|
|
|
import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_BATCH_COPY; |
|
|
|
|
import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_CREATE; |
|
|
|
@ -282,8 +281,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
|
|
|
|
|
Project project = projectMapper.queryByCode(projectCode); |
|
|
|
|
|
|
|
|
|
// check if user have write perm for project
|
|
|
|
|
Map<String, Object> result = |
|
|
|
|
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_CREATE); |
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
|
boolean hasProjectAndWritePerm = projectService.hasProjectAndWritePerm(loginUser, project, result); |
|
|
|
|
if (!hasProjectAndWritePerm) { |
|
|
|
|
return result; |
|
|
|
@ -765,8 +763,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
|
|
|
|
|
ProcessExecutionTypeEnum executionType) { |
|
|
|
|
Project project = projectMapper.queryByCode(projectCode); |
|
|
|
|
// check if user have write perm for project
|
|
|
|
|
Map<String, Object> result = |
|
|
|
|
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_UPDATE); |
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
|
boolean hasProjectAndWritePerm = projectService.hasProjectAndWritePerm(loginUser, project, result); |
|
|
|
|
if (!hasProjectAndWritePerm) { |
|
|
|
|
return result; |
|
|
|
@ -2397,8 +2394,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
|
|
|
|
|
int version) { |
|
|
|
|
Project project = projectMapper.queryByCode(projectCode); |
|
|
|
|
// check if user have write perm for project
|
|
|
|
|
Map<String, Object> result = |
|
|
|
|
projectService.checkProjectAndAuth(loginUser, project, projectCode, VERSION_DELETE); |
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
|
boolean hasProjectAndWritePerm = projectService.hasProjectAndWritePerm(loginUser, project, result); |
|
|
|
|
if (!hasProjectAndWritePerm) { |
|
|
|
|
return result; |
|
|
|
@ -2459,8 +2455,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
|
|
|
|
|
ProcessExecutionTypeEnum executionType) { |
|
|
|
|
Project project = projectMapper.queryByCode(projectCode); |
|
|
|
|
// check if user have write perm for project
|
|
|
|
|
Map<String, Object> result = |
|
|
|
|
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_CREATE); |
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
|
boolean hasProjectAndWritePerm = projectService.hasProjectAndWritePerm(loginUser, project, result); |
|
|
|
|
if (!hasProjectAndWritePerm) { |
|
|
|
|
return result; |
|
|
|
@ -2595,8 +2590,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
|
|
|
|
|
ProcessExecutionTypeEnum executionType) { |
|
|
|
|
Project project = projectMapper.queryByCode(projectCode); |
|
|
|
|
// check if user have write perm for project
|
|
|
|
|
Map<String, Object> result = |
|
|
|
|
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_UPDATE); |
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
|
boolean hasProjectAndWritePerm = projectService.hasProjectAndWritePerm(loginUser, project, result); |
|
|
|
|
if (!hasProjectAndWritePerm) { |
|
|
|
|
return result; |
|
|
|
|