From c2b641cfc6cfa1096c986de846f71e9fe19fee0a Mon Sep 17 00:00:00 2001 From: greysonfang Date: Wed, 11 Dec 2024 16:57:42 +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/pojo/vo/BatchOperateGroupMemberCheckVo.kt | 4 +++- .../rbac/service/RbacPermissionManageFacadeServiceImpl.kt | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/vo/BatchOperateGroupMemberCheckVo.kt b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/vo/BatchOperateGroupMemberCheckVo.kt index baa89c70154..f0eea15ac86 100644 --- a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/vo/BatchOperateGroupMemberCheckVo.kt +++ b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/vo/BatchOperateGroupMemberCheckVo.kt @@ -17,5 +17,7 @@ data class BatchOperateGroupMemberCheckVo( @get:Schema(title = "无效的流水线授权数量") val invalidPipelineAuthorizationCount: Int? = 0, @get:Schema(title = "无效的代码库授权数量") - val invalidRepositoryAuthorizationCount: Int? = 0 + val invalidRepositoryAuthorizationCount: Int? = 0, + @get:Schema(title = "可交接的组数量") + val canHandoverCount: Int? = 0 ) diff --git a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionManageFacadeServiceImpl.kt b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionManageFacadeServiceImpl.kt index 96913a8ff8c..c0ce39f5b39 100644 --- a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionManageFacadeServiceImpl.kt +++ b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionManageFacadeServiceImpl.kt @@ -1590,7 +1590,8 @@ class RbacPermissionManageFacadeServiceImpl( uniqueManagerCount = groupsOfUniqueManager.size, invalidGroupCount = invalidGroups.size, invalidPipelineAuthorizationCount = invalidPipelines.size, - invalidRepositoryAuthorizationCount = invalidRepositoryIds.size + invalidRepositoryAuthorizationCount = invalidRepositoryIds.size, + canHandoverCount = groupsOfUniqueManager.union(invalidGroups).size ) } } @@ -1663,7 +1664,8 @@ class RbacPermissionManageFacadeServiceImpl( operableCount = totalCount - inoperableCount, inoperableCount = groupsOfTemplateOrDeptJoined.size + groupCountOfExpired, invalidPipelineAuthorizationCount = invalidPipelines.size, - invalidRepositoryAuthorizationCount = invalidRepositoryIds.size + invalidRepositoryAuthorizationCount = invalidRepositoryIds.size, + canHandoverCount = totalCount - inoperableCount ) } }