mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 18:49:19 +00:00
feat: 用户详情中添加授权给用户所有账号列表
This commit is contained in:
@@ -1305,6 +1305,7 @@
|
|||||||
"databasePermissionRules": "Database Permission rules",
|
"databasePermissionRules": "Database Permission rules",
|
||||||
"k8sPermissionRules": "Kubernetes Permission rules",
|
"k8sPermissionRules": "Kubernetes Permission rules",
|
||||||
"grantedAssets": "Granted assets",
|
"grantedAssets": "Granted assets",
|
||||||
|
"grantedAccounts": "Granted accounts",
|
||||||
"grantedK8Ss": "Granted K8Ss",
|
"grantedK8Ss": "Granted K8Ss",
|
||||||
"grantedDatabases": "Granted databases",
|
"grantedDatabases": "Granted databases",
|
||||||
"grantedRemoteApps": "Granted remote apps",
|
"grantedRemoteApps": "Granted remote apps",
|
||||||
|
@@ -1341,6 +1341,7 @@
|
|||||||
"databasePermissionRules": "データベース認可ルール",
|
"databasePermissionRules": "データベース認可ルール",
|
||||||
"k8sPermissionRules": "Kubernetesライセンスルール",
|
"k8sPermissionRules": "Kubernetesライセンスルール",
|
||||||
"grantedAssets": "認可された資産",
|
"grantedAssets": "認可された資産",
|
||||||
|
"grantedAccounts": "公認アカウント",
|
||||||
"grantedK8Ss": "認可されたKubernetes",
|
"grantedK8Ss": "認可されたKubernetes",
|
||||||
"grantedDatabases": "認可されたデータベース",
|
"grantedDatabases": "認可されたデータベース",
|
||||||
"grantedRemoteApps": "許可されたリモートアプリケーション",
|
"grantedRemoteApps": "許可されたリモートアプリケーション",
|
||||||
|
@@ -1383,6 +1383,7 @@
|
|||||||
"databasePermissionRules": "数据库授权规则",
|
"databasePermissionRules": "数据库授权规则",
|
||||||
"k8sPermissionRules": "Kubernetes授权规则",
|
"k8sPermissionRules": "Kubernetes授权规则",
|
||||||
"grantedAssets": "授权的资产",
|
"grantedAssets": "授权的资产",
|
||||||
|
"grantedAccounts": "授权的账号",
|
||||||
"grantedK8Ss": "授权的Kubernetes",
|
"grantedK8Ss": "授权的Kubernetes",
|
||||||
"grantedDatabases": "授权的数据库",
|
"grantedDatabases": "授权的数据库",
|
||||||
"grantedRemoteApps": "授权的远程应用",
|
"grantedRemoteApps": "授权的远程应用",
|
||||||
|
81
src/views/users/User/UserDetail/UserGrantedAccounts.vue
Normal file
81
src/views/users/User/UserDetail/UserGrantedAccounts.vue
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<template>
|
||||||
|
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" class- />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ListTable from '@/components/ListTable'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'UserGrantedAccounts',
|
||||||
|
components: {
|
||||||
|
ListTable
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
object: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
const vm = this
|
||||||
|
return {
|
||||||
|
tableConfig: {
|
||||||
|
url: `/api/v1/perms/users/${this.object.id}/accounts/`,
|
||||||
|
columns: [
|
||||||
|
'asset', 'name', 'username', 'privileged', 'version', 'comment'
|
||||||
|
],
|
||||||
|
columnsShow: {
|
||||||
|
default: [
|
||||||
|
'asset', 'name', 'username', 'privileged', 'version'
|
||||||
|
],
|
||||||
|
min: ['asset_name', 'name']
|
||||||
|
},
|
||||||
|
columnsMeta: {
|
||||||
|
asset: {
|
||||||
|
label: this.$t('assets.Asset'),
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
formatter: function(row) {
|
||||||
|
const to = {
|
||||||
|
name: 'AssetDetail',
|
||||||
|
params: { id: row.asset.id }
|
||||||
|
}
|
||||||
|
if (vm.$hasPerm('assets.view_asset')) {
|
||||||
|
return <router-link to={ to } >{ row.asset.name }</router-link>
|
||||||
|
} else {
|
||||||
|
return <span>{ row.asset.name }</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
formatter: null
|
||||||
|
},
|
||||||
|
privileged: {
|
||||||
|
width: '120px',
|
||||||
|
label: this.$t('assets.Privileged'),
|
||||||
|
formatterArgs: {
|
||||||
|
showFalse: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tableAttrs: {
|
||||||
|
border: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
headerActions: {
|
||||||
|
hasSearch: true,
|
||||||
|
hasRefresh: true,
|
||||||
|
hasLeftActions: true,
|
||||||
|
hasRightActions: true,
|
||||||
|
hasExport: false,
|
||||||
|
hasImport: false,
|
||||||
|
hasCreate: false,
|
||||||
|
hasMoreActions: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -10,6 +10,7 @@
|
|||||||
import { GenericDetailPage } from '@/layout/components'
|
import { GenericDetailPage } from '@/layout/components'
|
||||||
import UserAssetPermissionRules from './UserAssetPermissionRules'
|
import UserAssetPermissionRules from './UserAssetPermissionRules'
|
||||||
import UserGrantedAssets from './UserGrantedAssets'
|
import UserGrantedAssets from './UserGrantedAssets'
|
||||||
|
import UserGrantedAccounts from './UserGrantedAccounts'
|
||||||
import UserGrantedApplications from './UserGrantedApplications'
|
import UserGrantedApplications from './UserGrantedApplications'
|
||||||
import UserApplicationPermissionRules from './UserApplicationsPermissionRules'
|
import UserApplicationPermissionRules from './UserApplicationsPermissionRules'
|
||||||
import UserLoginACLList from '@/views/acl/UserLoginACL/UserLoginACLList'
|
import UserLoginACLList from '@/views/acl/UserLoginACL/UserLoginACLList'
|
||||||
@@ -20,6 +21,7 @@ export default {
|
|||||||
GenericDetailPage,
|
GenericDetailPage,
|
||||||
UserInfo,
|
UserInfo,
|
||||||
UserGrantedAssets,
|
UserGrantedAssets,
|
||||||
|
UserGrantedAccounts,
|
||||||
UserAssetPermissionRules,
|
UserAssetPermissionRules,
|
||||||
UserGrantedApplications,
|
UserGrantedApplications,
|
||||||
UserApplicationPermissionRules,
|
UserApplicationPermissionRules,
|
||||||
@@ -44,6 +46,12 @@ export default {
|
|||||||
name: 'UserGrantedAssets',
|
name: 'UserGrantedAssets',
|
||||||
hidden: () => !vm.$hasPerm('perms.view_userassets')
|
hidden: () => !vm.$hasPerm('perms.view_userassets')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('users.tabs.grantedAccounts'),
|
||||||
|
name: 'UserGrantedAccounts',
|
||||||
|
// Todo: perms.view_useraccounts
|
||||||
|
hidden: () => !vm.$hasPerm('perms.view_userassets')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('users.tabs.assetPermissionRules'),
|
title: this.$t('users.tabs.assetPermissionRules'),
|
||||||
name: 'UserAssetPermissionRules',
|
name: 'UserAssetPermissionRules',
|
||||||
|
Reference in New Issue
Block a user