Skip to content

Commit

Permalink
feat:用户个人视角 权限管理优化 #11138
Browse files Browse the repository at this point in the history
  • Loading branch information
fcfang123 committed Dec 20, 2024
1 parent fadc28e commit 86d2150
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ interface UserAuthResourceMemberResource {
projectId: String,
@Parameter(description = "批量移除成员请求实体")
removeMemberDTO: GroupMemberRemoveConditionReq
): Result<String?>
): Result<String>

@DELETE
@Path("/single/{groupId}/{operateChannel}/remove")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1343,13 +1343,13 @@ class RbacPermissionManageFacadeServiceImpl(
userId: String,
projectCode: String,
removeMemberDTO: GroupMemberRemoveConditionReq
): String? {
): String {
logger.info("batch delete group members from personal $userId|$projectCode|$removeMemberDTO")
// 根据条件获取成员直接加入的用户组
val groupIds = getGroupIdsByGroupMemberCondition(
projectCode = projectCode,
commonCondition = removeMemberDTO
)[MemberType.USER]?.toMutableList() ?: return null
)[MemberType.USER]?.toMutableList() ?: return "true"

// 过滤掉审核中的用户组
val beingHandoverGroups = permissionHandoverApplicationService.listMemberHandoverDetails(
Expand Down Expand Up @@ -1402,7 +1402,7 @@ class RbacPermissionManageFacadeServiceImpl(
operateGroupMemberTask = ::deleteTask
)
if (toHandoverGroups.isEmpty() && invalidPipelines.isEmpty() && invalidRepertoryIds.isEmpty() && invalidEnvNodeIds.isEmpty()) {
return null
return "true"
}
val handoverDetails = buildHandoverDetails(
projectCode = projectCode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class SamplePermissionManageFacadeService : PermissionManageFacadeService {
userId: String,
projectCode: String,
removeMemberDTO: GroupMemberRemoveConditionReq
): String? = null
): String = "true"

override fun deleteResourceGroupMembers(
userId: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class UserAuthResourceMemberResourceImpl(
userId: String,
projectId: String,
removeMemberDTO: GroupMemberRemoveConditionReq
): Result<String?> {
): Result<String> {
permissionResourceValidateService.validateUserProjectPermissionByChannel(
userId = userId,
projectCode = projectId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ interface PermissionManageFacadeService {
userId: String,
projectCode: String,
removeMemberDTO: GroupMemberRemoveConditionReq
): String?
): String

/**
* 退出单个组
Expand Down

0 comments on commit 86d2150

Please sign in to comment.