Skip to content

Commit

Permalink
feat:流水线列表展示权限控制 TencentBlueKing#10895
Browse files Browse the repository at this point in the history
  • Loading branch information
fcfang123 committed Oct 28, 2024
1 parent 6b9f075 commit 9b51322
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ class PipelineListFacadeService @Autowired constructor(
authPipelines = authPipelines,
viewId = viewId,
pipelineFilterParamList = pipelineFilterParamList,
permissionFlag = null,
permissionFlag = true,
page = page,
pageSize = pageSize,
includeDelete = true,
Expand Down Expand Up @@ -956,6 +956,7 @@ class PipelineListFacadeService @Autowired constructor(
val authPipelines = pipelinePermissionService.getResourceByPermission(
userId = userId, projectId = projectId, permission = AuthPermission.LIST
)
val isControlPipelineListPermission = pipelinePermissionService.isControlPipelineListPermission(projectId)
val favorPipelines = pipelineGroupService.getFavorPipelines(userId = userId, projectId = projectId)
val recentUsePipelines = pipelineRecentUseService.listPipelineIds(userId, projectId)
val totalCount = pipelineBuildSummaryDao.listPipelineInfoBuildSummaryCount(
Expand All @@ -978,7 +979,7 @@ class PipelineListFacadeService @Autowired constructor(
viewId = PIPELINE_VIEW_FAVORITE_PIPELINES,
includeDelete = false,
userId = userId,
permissionFlag = true
permissionFlag = isControlPipelineListPermission
).toInt()
val myPipelineCount = pipelineBuildSummaryDao.listPipelineInfoBuildSummaryCount(
dslContext = dslContext,
Expand All @@ -989,7 +990,7 @@ class PipelineListFacadeService @Autowired constructor(
viewId = PIPELINE_VIEW_MY_PIPELINES,
includeDelete = false,
userId = userId,
permissionFlag = true
permissionFlag = isControlPipelineListPermission
).toInt()
val recentUseCount = pipelineBuildSummaryDao.listPipelineInfoBuildSummaryCount(
dslContext = dslContext,
Expand All @@ -1001,7 +1002,7 @@ class PipelineListFacadeService @Autowired constructor(
includeDelete = false,
userId = userId,
pipelineIds = recentUsePipelines,
permissionFlag = true
permissionFlag = isControlPipelineListPermission
).toInt()
val recycleCount = pipelineInfoDao.countPipeline(
dslContext = dslContext,
Expand Down

0 comments on commit 9b51322

Please sign in to comment.