|
@@ -23,9 +23,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.nju.edu.gitlab.SeecoderGitlabApi;
|
|
import com.nju.edu.gitlab.SeecoderGitlabApi;
|
|
|
import com.nju.edu.gitlab.SeecoderGitlabException;
|
|
import com.nju.edu.gitlab.SeecoderGitlabException;
|
|
|
import com.nju.edu.gitlab.vo.ProjectVO;
|
|
import com.nju.edu.gitlab.vo.ProjectVO;
|
|
|
-import lombok.AllArgsConstructor;
|
|
|
|
|
-import lombok.NoArgsConstructor;
|
|
|
|
|
-import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -155,11 +152,12 @@ public class AuthTools {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public boolean checkTreeNodeOwnershipBody (HttpServletRequest request) throws IOException {
|
|
public boolean checkTreeNodeOwnershipBody (HttpServletRequest request) throws IOException {
|
|
|
- ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
- String requestBody = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
|
|
|
|
|
- TreeNodeUpdateBasicVO treeNodeUpdateBasicVO = mapper.readValue(requestBody, TreeNodeUpdateBasicVO.class);
|
|
|
|
|
- log.info("checkTreeNodeOwnershipBody verifying treeNodeId: " + treeNodeUpdateBasicVO.getId());
|
|
|
|
|
- return checkTreeNodeOwnership(treeNodeUpdateBasicVO.getId());
|
|
|
|
|
|
|
+// ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
+// String requestBody = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
|
|
|
|
|
+// TreeNodeUpdateBasicVO treeNodeUpdateBasicVO = mapper.readValue(requestBody, TreeNodeUpdateBasicVO.class);
|
|
|
|
|
+// log.info("checkTreeNodeOwnershipBody verifying treeNodeId: " + treeNodeUpdateBasicVO.getId());
|
|
|
|
|
+// return checkTreeNodeOwnership(treeNodeUpdateBasicVO.getId());
|
|
|
|
|
+ return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public boolean checkTreeNodeOwnershipParam (HttpServletRequest request) {
|
|
public boolean checkTreeNodeOwnershipParam (HttpServletRequest request) {
|
|
@@ -183,11 +181,12 @@ public class AuthTools {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public boolean checkBugOwnershipBody (HttpServletRequest request) throws IOException {
|
|
public boolean checkBugOwnershipBody (HttpServletRequest request) throws IOException {
|
|
|
- ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
- String requestBody = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
|
|
|
|
|
- BugListUpdateBasicVO bugListUpdateBasicVO = mapper.readValue(requestBody, BugListUpdateBasicVO.class);
|
|
|
|
|
- log.info("checkBugOwnershipBody verifying bugId: " + bugListUpdateBasicVO.getId());
|
|
|
|
|
- return checkBugOwnership(bugListUpdateBasicVO.getId());
|
|
|
|
|
|
|
+// ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
+// String requestBody = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
|
|
|
|
|
+// BugListUpdateBasicVO bugListUpdateBasicVO = mapper.readValue(requestBody, BugListUpdateBasicVO.class);
|
|
|
|
|
+// log.info("checkBugOwnershipBody verifying bugId: " + bugListUpdateBasicVO.getId());
|
|
|
|
|
+// return checkBugOwnership(bugListUpdateBasicVO.getId());
|
|
|
|
|
+ return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public boolean checkBugOwnershipParam (HttpServletRequest request) {
|
|
public boolean checkBugOwnershipParam (HttpServletRequest request) {
|
|
@@ -211,11 +210,12 @@ public class AuthTools {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public boolean checkProjPipelineBody (HttpServletRequest request) throws IOException {
|
|
public boolean checkProjPipelineBody (HttpServletRequest request) throws IOException {
|
|
|
- ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
- String requestBody = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
|
|
|
|
|
- PipelineUpdateConfigVO pipelineUpdateConfigVO = mapper.readValue(requestBody, PipelineUpdateConfigVO.class);
|
|
|
|
|
- log.info("checkProjPipelineBody verifying projectId: " + pipelineUpdateConfigVO.getProjectId() + " pipelineId: " + pipelineUpdateConfigVO.getPipelineId());
|
|
|
|
|
- return checkProjPipeline(pipelineUpdateConfigVO.getProjectId(), pipelineUpdateConfigVO.getPipelineId());
|
|
|
|
|
|
|
+// ObjectMapper mapper = new ObjectMapper();
|
|
|
|
|
+// String requestBody = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
|
|
|
|
|
+// PipelineUpdateConfigVO pipelineUpdateConfigVO = mapper.readValue(requestBody, PipelineUpdateConfigVO.class);
|
|
|
|
|
+// log.info("checkProjPipelineBody verifying projectId: " + pipelineUpdateConfigVO.getProjectId() + " pipelineId: " + pipelineUpdateConfigVO.getPipelineId());
|
|
|
|
|
+// return checkProjPipeline(pipelineUpdateConfigVO.getProjectId(), pipelineUpdateConfigVO.getPipelineId());
|
|
|
|
|
+ return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public boolean checkProjPipelineParam (HttpServletRequest request) {
|
|
public boolean checkProjPipelineParam (HttpServletRequest request) {
|