Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:支持管理员查看项目成员 #9620 #10829

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class RbacPermissionResourceMemberService constructor(

val memberDetails = deptService.getMemberInfo(
memberId = memberId,
memberType = ManagerScopesEnum.valueOf(memberType)
memberType = ManagerScopesEnum.valueOf(memberType.uppercase())
)
with(authResourceGroup) {
authResourceGroupMemberDao.create(
Expand Down Expand Up @@ -388,7 +388,7 @@ class RbacPermissionResourceMemberService constructor(
iamMemberInfos.forEach {
val memberDetails = deptService.getMemberInfo(
memberId = it.id,
memberType = ManagerScopesEnum.valueOf(it.type)
memberType = ManagerScopesEnum.valueOf(it.type.uppercase())
)
groupMembersList.add(
AuthResourceGroupMember(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ object NodeStringIdUtils {
gateway = "",
displayName = getRefineDisplayName(nodeStringId, nodeRecord.displayName),
envEnableNode = null,
lastModifyTime = nodeRecord.lastModifyTime.timestampmilli()
lastModifyTime = (nodeRecord.lastModifyTime ?: nodeRecord.createdTime).timestampmilli()
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import com.tencent.devops.common.auth.callback.FetchInstanceInfo
import com.tencent.devops.common.auth.callback.ListInstanceInfo
import com.tencent.devops.common.auth.callback.ListResourcesAuthorizationDTO
import com.tencent.devops.common.auth.callback.SearchInstanceInfo
import com.tencent.devops.common.pipeline.enums.ChannelCode
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
Expand Down Expand Up @@ -141,6 +142,7 @@ class AuthPipelineService @Autowired constructor(
authTokenApi.checkToken(token)
val pipelineInfos = pipelineListFacadeService.getPipelinePage(
projectId = projectId,
channelCode = ChannelCode.BS,
limit = limit,
offset = offset
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1676,14 +1676,20 @@ class PipelineListFacadeService @Autowired constructor(
)
}

fun getPipelinePage(projectId: String, limit: Int?, offset: Int?): PipelineViewPipelinePage<PipelineInfo> {
fun getPipelinePage(
projectId: String,
limit: Int?,
offset: Int?,
channelCode: ChannelCode? = null
): PipelineViewPipelinePage<PipelineInfo> {
logger.info("getPipeline |$projectId| $limit| $offset")
val limitNotNull = limit ?: 10
val offsetNotNull = offset ?: 0
val pipelineRecords =
pipelineInfoDao.listPipelineInfoByProject(
dslContext = dslContext,
projectId = projectId,
channelCode = channelCode,
limit = limitNotNull,
offset = offsetNotNull
)
Expand Down
Loading