feat: 用户详情tab页rbac控制 (#1359) (#1362)

* perf: debug account

* Debug: 添加 debug

* debug: 添加线上debug

* debug: remove vue config

* chore: diglog 添加vif

* debug: authbook

* chore: debug account

* fix: 修改资产账号更新弹窗组件传参方式

* perf: 修改 authbook

* fix: 修复资产账号的更新组件不生效问题

* perf: change build scropt

* feat: 配置概况页的路由权限

* fix: 修复工单流自定义用户获取全局用户bug

* feat: 用户详情tab页rbac控制

* feat: 用户组详情tab添加rbac

* feat: 资产详情tab添加rbac

* feat: 角色列表详情tab添加rbac

* feat: 资产管理详情页tab添加rbac

* feat: 账号管理详情tab增加rbac

* feat: 权限管理详情tab添加rbac

* feat: 作业中心详情tab添加rbac

* feat: 系统设置tab添加rbac

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>

Co-authored-by: fit2bot <68588906+fit2bot@users.noreply.github.com>
Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>
This commit is contained in:
Jiangjie.Bai
2022-03-03 10:36:05 +08:00
committed by GitHub
parent c0448afda4
commit 17e6d2fe84
13 changed files with 57 additions and 28 deletions

View File

@@ -29,7 +29,8 @@ export default {
},
{
title: this.$t('xpack.ChangeAuthPlan.ExecutionList'),
name: 'AccountBackupPlanExecutionList'
name: 'AccountBackupPlanExecutionList',
hidden: () => !this.$hasPerm('assets.view_accountbackupplanexecution')
}
],
actions: {

View File

@@ -24,11 +24,14 @@ export default {
submenu: [
{
title: this.$t('xpack.ChangeAuthPlan.AssetChangeAuthPlan'),
name: 'AssetChangeAuthPlanList'
name: 'AssetChangeAuthPlanList',
hidden: () => !this.$hasPerm('xpack.view_changeauthplan')
},
{
title: this.$t('xpack.ChangeAuthPlan.AppChangeAuthPlan'),
name: 'AppChangeAuthPlanList'
name: 'AppChangeAuthPlanList',
hidden: () => !this.$hasPerm('xpack.view_changeauthplan')
}
]
}

View File

@@ -35,15 +35,18 @@ export default {
},
{
title: this.$t('assets.SystemUser'),
name: 'SystemUserList'
name: 'SystemUserList',
hidden: () => !this.$hasPerm('assets.view_systemuser')
},
{
title: this.$t('assets.AccountList'),
name: 'Account'
name: 'Account',
hidden: () => !this.$hasPerm('assets.view_authbook')
},
{
title: this.$t('assets.PermUserList'),
name: 'PermUserList'
name: 'PermUserList',
hidden: () => !this.$hasPerm('ssets.view_asset')
}
],
hasRightSide: true,

View File

@@ -29,7 +29,8 @@ export default {
},
{
title: this.$t('assets.CommandFilterRules'),
name: 'rules'
name: 'rules',
hidden: () => !this.$hasPerm('assets.view_commandfilterrule')
}
],
hasRightSide: true

View File

@@ -29,7 +29,8 @@ export default {
},
{
title: this.$t('assets.Gateway'),
name: 'GatewayList'
name: 'GatewayList',
hidden: () => !this.$hasPerm('assets.view_gateway')
}
],
hasRightSide: true

View File

@@ -24,11 +24,13 @@ export default {
submenu: [
{
title: this.$t('assets.CommonUser'),
name: 'CommonUserList'
name: 'CommonUserList',
hidden: () => !this.$hasPerm('assets.view_systemuser')
},
{
title: this.$t('assets.AdminUser'),
name: 'AdminUserList'
name: 'AdminUserList',
hidden: () => !this.$hasPerm('assets.view_domain')
}
]
}

View File

@@ -33,11 +33,13 @@ export default {
},
{
title: this.$t('ops.taskVersions'),
name: 'TaskAdhoc'
name: 'TaskAdhoc',
hidden: () => !this.$hasPerm('ops.view_task')
},
{
title: this.$t('ops.execution'),
name: 'TaskHistory'
name: 'TaskHistory',
hidden: () => !this.$hasPerm('ops.view_taskmonitor')
}
],
hasRightSide: false

View File

@@ -32,11 +32,13 @@ export default {
},
{
title: this.$t('perms.usersAndUserGroups'),
name: 'ApplicationPermissionUser'
name: 'ApplicationPermissionUser',
hidden: () => !this.$hasPerm('perms.view_applicationpermission')
},
{
title: this.$t('perms.appsList'),
name: 'ApplicationsPermission'
name: 'ApplicationsPermission',
hidden: () => !this.$hasPerm('perms.view_applicationpermission')
}
],
actions: {

View File

@@ -35,11 +35,13 @@ export default {
},
{
title: this.$t('perms.usersAndUserGroups'),
name: 'AssetPermissionUser'
name: 'AssetPermissionUser',
hidden: () => !this.$hasPerm('perms.view_assetpermission')
},
{
title: this.$t('perms.assetAndNode'),
name: 'AssetPermissionAsset'
name: 'AssetPermissionAsset',
hidden: () => !this.$hasPerm('perms.view_assetpermission')
}
]
}

View File

@@ -34,19 +34,23 @@ export default {
},
{
title: this.$t('route.Terminal'),
name: 'TerminalList'
name: 'TerminalList',
hidden: () => !this.$hasPerm('terminal.view_command')
},
{
title: this.$t('sessions.replayStorage'),
name: 'ReplayStorage'
name: 'ReplayStorage',
hidden: () => !this.$hasPerm('terminal.view_replaystorage')
},
{
title: this.$t('sessions.commandStorage'),
name: 'CommandStorage'
name: 'CommandStorage',
hidden: () => !this.$hasPerm('terminal.view_commandstorage')
},
{
title: this.$t('xpack.ComponentMonitor'),
name: 'Monitor'
name: 'Monitor',
hidden: () => !this.$hasPerm('terminal.view_terminal')
}
]
}

View File

@@ -30,7 +30,8 @@ export default {
},
{
title: this.$t('users.tabs.grantedAssets'),
name: 'GroupGrantedAssets'
name: 'GroupGrantedAssets',
hidden: () => !this.$hasPerm('perms.view_usergroupassets')
}
]
}

View File

@@ -40,11 +40,13 @@ export default {
submenu: [
{
title: this.$t('users.RoleInfo'),
name: 'RoleInfo'
name: 'RoleInfo',
hidden: () => !this.$hasPerm('rbac.view_role')
},
{
title: this.$t('users.RoleUsers'),
name: 'RoleUsers'
name: 'RoleUsers',
hidden: () => !this.$hasPerm('rbac.view_role')
}
]
}

View File

@@ -47,23 +47,28 @@ export default {
},
{
title: this.$t('users.tabs.grantedAssets'),
name: 'UserGrantedAssets'
name: 'UserGrantedAssets',
hidden: () => !vm.$hasPerm('perms.view_myassets')
},
{
title: this.$t('users.tabs.assetPermissionRules'),
name: 'UserAssetPermissionRules'
name: 'UserAssetPermissionRules',
hidden: () => !vm.$hasPerm('perms.view_assetpermission')
},
{
title: this.$t('users.tabs.grantedApplications'),
name: 'UserGrantedApplications'
name: 'UserGrantedApplications',
hidden: () => !vm.$hasPerm('perms.view_usergroupapps')
},
{
title: this.$t('users.tabs.ApplicationPermissionRules'),
name: 'UserApplicationPermissionRules'
name: 'UserApplicationPermissionRules',
hidden: () => !vm.$hasPerm('perms.view_applicationpermission')
},
{
title: this.$t('route.UserAclLists'),
name: 'UserLoginACLList'
name: 'UserLoginACLList',
hidden: () => !vm.$hasPerm('acls.view_loginacl')
}
]
}