Skip to content

Commit

Permalink
Merge pull request #11218 from vhwweng/issue_11217
Browse files Browse the repository at this point in the history
bug: 权限管理用户组添加人员模板同步数据 #11217
  • Loading branch information
bkci-bot authored Nov 15, 2024
2 parents d55c96c + 5c2e00a commit f5bd3f0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/frontend/bk-permission/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bk-permission",
"version": "0.1.3",
"version": "0.1.4",
"description": "",
"main": "./dist/main.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,20 @@ export default {
this.handleChooseGroup(this.groupList[0]);
break;
case 'add_user_confirm':
case 'add_template_confirm':
this.groupList[this.curGroupIndex].departmentCount += data.data.departments.length
this.groupList[this.curGroupIndex].userCount += data.data.users.length
this.groupList[this.curGroupIndex].templateCount += data.data.templates.length
this.syncGroupIAM(this.groupList[this.curGroupIndex].groupId)
break;
case 'remove_user_confirm': {
case 'remove_user_confirm':
case 'remove_template_confirm': {
const departments = data.data.members.filter(i => i.type === 'department')
const users = data.data.members.filter(i => i.type === 'user')
const templates = data.data.members.filter(i => i.type === 'template')
this.groupList[this.curGroupIndex].departmentCount -= departments.length
this.groupList[this.curGroupIndex].userCount -= users.length
this.groupList[this.curGroupIndex].templateCount -= templates.length
this.syncGroupIAM(this.groupList[this.curGroupIndex].groupId)
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,20 @@ export default {
this.handleChooseGroup(this.groupList[0]);
break;
case 'add_user_confirm':
case 'add_template_confirm':
this.groupList[this.curGroupIndex].departmentCount += data.data.departments.length
this.groupList[this.curGroupIndex].userCount += data.data.users.length
this.groupList[this.curGroupIndex].templateCount += data.data.templates.length
this.syncGroupIAM(this.groupList[this.curGroupIndex].groupId)
break;
case 'remove_user_confirm': {
case 'remove_user_confirm':
case 'remove_template_confirm': {
const departments = data.data.members.filter(i => i.type === 'department')
const users = data.data.members.filter(i => i.type === 'user')
const templates = data.data.members.filter(i => i.type === 'template')
this.groupList[this.curGroupIndex].departmentCount -= departments.length
this.groupList[this.curGroupIndex].userCount -= users.length
this.groupList[this.curGroupIndex].templateCount -= templates.length
this.syncGroupIAM(this.groupList[this.curGroupIndex].groupId)
break;
}
Expand Down

0 comments on commit f5bd3f0

Please sign in to comment.