zwZjut commented on a change in pull request #6966:
URL: https://github.com/apache/dolphinscheduler/pull/6966#discussion_r755670031
##########
File path:
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessTaskRelationServiceImpl.java
##########
@@ -114,29 +116,70 @@
/**
* delete task upstream relation
*
- * @param loginUser login user
- * @param projectCode project code
+ * @param loginUser login user
+ * @param projectCode project code
* @param preTaskCodes the pre task codes, sep ','
- * @param taskCode the post task code
+ * @param taskCode the post task code
* @return delete result code
*/
@Override
public Map<String, Object> deleteUpstreamRelation(User loginUser, long
projectCode, String preTaskCodes, long taskCode) {
- return null;
+ Project project = projectMapper.queryByCode(projectCode);
+ //check user access for project
+ Map<String, Object> result =
projectService.checkProjectAndAuth(loginUser, project, projectCode);
+ if (result.get(Constants.STATUS) != Status.SUCCESS) {
+ return result;
+ }
+ if (org.apache.commons.lang.StringUtils.isEmpty(preTaskCodes)) {
Review comment:
@RequestParam(name = "postTaskCodes", required = true) String
postTaskCodes, empty string is allowed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]