Skip to content

Commit

Permalink
Merge pull request #9701 from fcfang123/issue-9690
Browse files Browse the repository at this point in the history
feat:支持给一组用户添加流水线权限 #9690
  • Loading branch information
bkci-bot authored Jan 4, 2024
2 parents 751a786 + c7b6627 commit e854091
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object Versions {
const val jjwt = "0.11.5"
const val Okhttp = "4.9.0"
const val jgit = "5.13.1.202206130422-r"
const val iam = "1.0.0"
const val iam = "1.0.1"
const val disklrucache = "2.0.2"
const val BkCrypto = "1.1.3"
const val audit = "1.0.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,7 @@ data class IamGroupMemberInfoVo(
@ApiModelProperty("过期时间戳")
val expiredAt: Long,
@ApiModelProperty("过期时间展示")
val expiredDisplay: String
val expiredDisplay: String,
@ApiModelProperty("是否直接加入")
val directAdded: Boolean? = null
)
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class PermissionGradeManagerService @Autowired constructor(
.authorization_scopes(authorizationScopes)
.subject_scopes(subjectScopes)
.sync_perm(true)
.syncSubjectTemplate(true)
.groupName(manageGroupConfig.groupName)
.build()
val gradeManagerId = iamV2ManagerService.createManagerV2(createManagerDTO)
Expand Down Expand Up @@ -200,6 +201,7 @@ class PermissionGradeManagerService @Autowired constructor(
.authorizationScopes(authorizationScopes)
.subjectScopes(subjectScopes)
.syncPerm(true)
.syncSubjectTemplate(true)
.groupName(manageGroupConfig.groupName)
.applicant(userId)
.reason(
Expand Down Expand Up @@ -421,6 +423,7 @@ class PermissionGradeManagerService @Autowired constructor(
val managerRoleGroupDTO = ManagerRoleGroupDTO.builder()
.groups(listOf(managerRoleGroup))
.createAttributes(false)
.syncSubjectTemplate(true)
.build()
val iamGroupId = iamV2ManagerService.batchCreateRoleGroupV2(gradeManagerId, managerRoleGroupDTO)
authResourceGroupDao.create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ class RbacPermissionResourceGroupService @Autowired constructor(
createdTime = createTime,
status = status,
expiredAt = expiredAt,
expiredDisplay = expiredDisplay
expiredDisplay = expiredDisplay,
directAdded = result.directAdded.toBoolean()
)
} else {
val status = GroupMemberStatus.NOT_JOINED.name
Expand Down

0 comments on commit e854091

Please sign in to comment.