fix(权限管理): 项目权限检查
This commit is contained in:
parent
7e7d726832
commit
3c17fc2879
|
@ -28,7 +28,7 @@ public class ApiModuleController {
|
||||||
|
|
||||||
@GetMapping("/list/{projectId}/{protocol}")
|
@GetMapping("/list/{projectId}/{protocol}")
|
||||||
public List<ApiModuleDTO> getNodeByProjectId(@PathVariable String projectId, @PathVariable String protocol) {
|
public List<ApiModuleDTO> getNodeByProjectId(@PathVariable String projectId, @PathVariable String protocol) {
|
||||||
checkPermissionService.checkProjectOwner(projectId);
|
// checkPermissionService.checkProjectOwner(projectId);
|
||||||
String userId = SessionUtils.getUserId();
|
String userId = SessionUtils.getUserId();
|
||||||
ApiDefinitionDefaultApiTypeUtil.addUserSelectApiType(userId, protocol);
|
ApiDefinitionDefaultApiTypeUtil.addUserSelectApiType(userId, protocol);
|
||||||
return apiModuleService.getNodeTreeByProjectId(projectId, protocol);
|
return apiModuleService.getNodeTreeByProjectId(projectId, protocol);
|
||||||
|
@ -36,7 +36,7 @@ public class ApiModuleController {
|
||||||
|
|
||||||
@GetMapping("/getModuleByName/{projectId}/{protocol}")
|
@GetMapping("/getModuleByName/{projectId}/{protocol}")
|
||||||
public ApiModule getModuleByName(@PathVariable String projectId, @PathVariable String protocol) {
|
public ApiModule getModuleByName(@PathVariable String projectId, @PathVariable String protocol) {
|
||||||
checkPermissionService.checkProjectOwner(projectId);
|
// checkPermissionService.checkProjectOwner(projectId);
|
||||||
return apiModuleService.getModuleByName(projectId, protocol);
|
return apiModuleService.getModuleByName(projectId, protocol);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class ApiTestEnvironmentController {
|
||||||
|
|
||||||
@GetMapping("/list/{projectId}")
|
@GetMapping("/list/{projectId}")
|
||||||
public List<ApiTestEnvironmentWithBLOBs> list(@PathVariable String projectId) {
|
public List<ApiTestEnvironmentWithBLOBs> list(@PathVariable String projectId) {
|
||||||
checkPermissionService.checkProjectOwner(projectId);
|
// checkPermissionService.checkProjectOwner(projectId);
|
||||||
return apiTestEnvironmentService.list(projectId);
|
return apiTestEnvironmentService.list(projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class PerformanceTestController {
|
||||||
public Pager<List<FileMetadata>> getProjectFiles(@PathVariable String projectId, @PathVariable String loadType,
|
public Pager<List<FileMetadata>> getProjectFiles(@PathVariable String projectId, @PathVariable String loadType,
|
||||||
@PathVariable int goPage, @PathVariable int pageSize,
|
@PathVariable int goPage, @PathVariable int pageSize,
|
||||||
@RequestBody QueryProjectFileRequest request) {
|
@RequestBody QueryProjectFileRequest request) {
|
||||||
checkPermissionService.checkProjectOwner(projectId);
|
// checkPermissionService.checkProjectOwner(projectId);
|
||||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||||
return PageUtils.setPageInfo(page, performanceTestService.getProjectFiles(projectId, loadType, request));
|
return PageUtils.setPageInfo(page, performanceTestService.getProjectFiles(projectId, loadType, request));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue