fix(工作台): 缺陷列表部分接口的权限问题

--bug=1048989 --user=宋昌昌 【工作台】待办-用户无缺陷的查询权限-待办页显示暂无资源权限 https://www.tapd.cn/55049933/s/1611501
This commit is contained in:
song-cc-rock 2024-11-18 17:53:38 +08:00 committed by Craftsman
parent 8244a9a92c
commit bfc36b71d1
2 changed files with 18 additions and 3 deletions

View File

@ -3,7 +3,9 @@ package io.metersphere.dashboard.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.metersphere.api.dto.definition.ApiDefinitionUpdateDTO;
import io.metersphere.bug.dto.response.BugColumnsOptionDTO;
import io.metersphere.bug.service.BugCommonService;
import io.metersphere.bug.service.BugService;
import io.metersphere.dashboard.dto.LayoutDTO;
import io.metersphere.dashboard.request.DashboardFrontPageRequest;
import io.metersphere.dashboard.response.OverViewCountDTO;
@ -14,6 +16,7 @@ import io.metersphere.plugin.platform.dto.SelectOption;
import io.metersphere.project.service.PermissionCheckService;
import io.metersphere.sdk.constants.PermissionConstants;
import io.metersphere.sdk.exception.MSException;
import io.metersphere.system.dto.sdk.TemplateCustomFieldDTO;
import io.metersphere.system.security.CheckOwner;
import io.metersphere.system.utils.PageUtils;
import io.metersphere.system.utils.Pager;
@ -36,6 +39,8 @@ public class DashboardController {
@Resource
private DashboardService dashboardService;
@Resource
private BugService bugService;
@Resource
private BugCommonService bugCommonService;
@Resource
private PermissionCheckService permissionCheckService;
@ -185,5 +190,18 @@ public class DashboardController {
return PageUtils.setPageInfo(page, dashboardService.getApiUpdatePage(request));
}
@GetMapping("/header/custom-field/{projectId}")
@Operation(summary = "缺陷列表-获取表头自定义字段集合")
@CheckOwner(resourceId = "#projectId", resourceType = "project")
public List<TemplateCustomFieldDTO> getHeaderFields(@PathVariable String projectId) {
return bugService.getHeaderCustomFields(projectId);
}
@GetMapping("/header/columns-option/{projectId}")
@Operation(summary = "缺陷列表-获取表头状态选项")
@CheckOwner(resourceId = "#projectId", resourceType = "project")
public BugColumnsOptionDTO getHeaderOption(@PathVariable String projectId) {
return bugService.getHeaderOption(projectId);
}
}

View File

@ -19,7 +19,6 @@ import io.metersphere.plan.service.TestPlanStatisticsService;
import io.metersphere.project.service.ProjectApplicationService;
import io.metersphere.sdk.util.LogUtils;
import io.metersphere.system.security.CheckOwner;
import io.metersphere.system.service.UserPlatformAccountService;
import io.metersphere.system.utils.PageUtils;
import io.metersphere.system.utils.Pager;
import io.metersphere.system.utils.SessionUtils;
@ -57,8 +56,6 @@ public class ToDoController {
@Resource
private ProjectApplicationService projectApplicationService;
@Resource
private UserPlatformAccountService userPlatformAccountService;
@Resource
private TestPlanStatisticsService testPlanStatisticsService;
@PostMapping("/plan/page")