From 2aa3affa02cf5adf9cd226a28cf599c168509474 Mon Sep 17 00:00:00 2001 From: stubenhuang Date: Tue, 10 Sep 2024 16:54:52 +0800 Subject: [PATCH] =?UTF-8?q?issue:=20=E4=BF=AE=E5=A4=8Dsample=E9=89=B4?= =?UTF-8?q?=E6=9D=83=E4=B8=8B=E6=9F=A5project=E5=85=A8=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20#10941?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/permission/ProjectPermissionServiceImpl.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/backend/ci/core/project/biz-project/src/main/kotlin/com/tencent/devops/project/service/permission/ProjectPermissionServiceImpl.kt b/src/backend/ci/core/project/biz-project/src/main/kotlin/com/tencent/devops/project/service/permission/ProjectPermissionServiceImpl.kt index b46e5dd25f4..b456548d418 100644 --- a/src/backend/ci/core/project/biz-project/src/main/kotlin/com/tencent/devops/project/service/permission/ProjectPermissionServiceImpl.kt +++ b/src/backend/ci/core/project/biz-project/src/main/kotlin/com/tencent/devops/project/service/permission/ProjectPermissionServiceImpl.kt @@ -51,12 +51,7 @@ class ProjectPermissionServiceImpl @Autowired constructor( ) : ProjectPermissionService { override fun verifyUserProjectPermission(accessToken: String?, projectCode: String, userId: String): Boolean { - val projectCodes = authProjectApi.getUserProjects( - serviceCode = projectAuthServiceCode, - userId = userId, - supplier = supplierForPermission - ) - return projectCodes.contains(projectCode) + return projectDao.countByEnglishName(dslContext, listOf(projectCode)) > 0 } private val supplierForPermission = {