Skip to content

Commit

Permalink
feat:支持管理员查看项目成员 TencentBlueKing#9620
Browse files Browse the repository at this point in the history
  • Loading branch information
fcfang123 committed Jun 18, 2024
1 parent 4601320 commit 988c569
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,13 @@ import com.tencent.devops.common.web.RestResource
@RestResource
class UserAuthAuthorizationResourceImpl(
val permissionAuthorizationService: PermissionAuthorizationService,
val permissionResourceService: PermissionResourceService
) : UserAuthAuthorizationResource {
override fun listResourceAuthorization(
userId: String,
projectId: String,
condition: ResourceAuthorizationConditionDTO
): Result<List<ResourceAuthorizationDTO>> {
permissionResourceService.hasManagerPermission(
userId = userId,
projectId = projectId,
resourceType = AuthResourceType.PROJECT.value,
resourceCode = projectId
)
// todo 管理员校验
return Result(
permissionAuthorizationService.listResourceAuthorizations(
condition = condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationDTO
import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationHandoverConditionDTO
import com.tencent.devops.common.auth.enums.ResourceAuthorizationHandoverStatus
import com.tencent.devops.common.web.RestResource
import com.tencent.devops.environment.api.UserEnvironmentAuthorizationResource
import com.tencent.devops.repository.api.UserRepositoryAuthorizationResource
import com.tencent.devops.repository.service.permission.RepositoryAuthorizationService

@RestResource
class UserRepositoryAuthorizationResourceImpl constructor(
private val repositoryAuthorizationService: RepositoryAuthorizationService
) : UserEnvironmentAuthorizationResource {
override fun resetEnvironmentAuthorization(
) : UserRepositoryAuthorizationResource {
override fun resetRepositoryAuthorization(
userId: String,
projectId: String,
condition: ResourceAuthorizationHandoverConditionDTO
Expand Down

0 comments on commit 988c569

Please sign in to comment.