From 0cd72408ab38e669dcb62b5cf61385ac3f6e4ecb Mon Sep 17 00:00:00 2001 From: greysonfang Date: Thu, 5 Dec 2024 15:02:10 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=94=A8=E6=88=B7=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E8=A7=86=E8=A7=92=20=E6=9D=83=E9=99=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96=20#11138?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops/auth/api/user/UserAuthResourceGroupResource.kt | 3 +++ .../auth/resources/user/UserAuthResourceGroupResourceImpl.kt | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/user/UserAuthResourceGroupResource.kt b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/user/UserAuthResourceGroupResource.kt index 6cd6157f42d..be36c7f632c 100644 --- a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/user/UserAuthResourceGroupResource.kt +++ b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/user/UserAuthResourceGroupResource.kt @@ -132,6 +132,9 @@ interface UserAuthResourceGroupResource { @Parameter(description = "项目ID", required = true) @PathParam("projectId") projectId: String, + @Parameter(description = "资源类型", required = true) + @PathParam("resourceType") + resourceType: String, @Parameter(description = "用户组Id") @PathParam("groupId") groupId: Int, diff --git a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/resources/user/UserAuthResourceGroupResourceImpl.kt b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/resources/user/UserAuthResourceGroupResourceImpl.kt index a875d83f021..fd5ca11b2be 100644 --- a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/resources/user/UserAuthResourceGroupResourceImpl.kt +++ b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/resources/user/UserAuthResourceGroupResourceImpl.kt @@ -116,6 +116,7 @@ class UserAuthResourceGroupResourceImpl @Autowired constructor( override fun getMemberGroupDetails( userId: String, projectId: String, + resourceType: String, groupId: Int, memberId: String ): Result { @@ -129,8 +130,9 @@ class UserAuthResourceGroupResourceImpl @Autowired constructor( permissionManageFacadeService.getMemberGroupsDetails( projectId = projectId, memberId = memberId, + resourceType = resourceType, iamGroupIds = listOf(groupId) - ).records.first { it.groupId == groupId || it.joinedType == JoinedType.DIRECT } + ).records.first { it.groupId == groupId || it.joinedType == JoinedType.DIRECT } ) }