mirror of
https://github.com/veops/cmdb.git
synced 2025-08-07 23:34:00 +08:00
update acl
This commit is contained in:
@@ -9,6 +9,6 @@ const api = {
|
||||
SendSms: '/account/sms',
|
||||
SendSmsErr: '/account/sms_err',
|
||||
// get my info
|
||||
UserInfo: '/v1/perms/user/info'
|
||||
UserInfo: '/v1/acl/users/info'
|
||||
}
|
||||
export default api
|
||||
|
@@ -1,12 +1,17 @@
|
||||
<template>
|
||||
<div class="user-wrapper">
|
||||
<div class="content-box">
|
||||
<a href="https://github.com/pycook/cmdb" target="_blank">
|
||||
<span class="action">
|
||||
源代码 -> <a-icon type="github" style="font-size: 20px; color: #002140"></a-icon>
|
||||
</span>
|
||||
</a>
|
||||
<!-- <a href="https://pro.loacg.com/docs/getting-started" target="_blank">
|
||||
<span class="action">
|
||||
<a-icon type="question-circle-o"></a-icon>
|
||||
</span>
|
||||
</a> -->
|
||||
<!-- <notice-icon class="action"/> -->
|
||||
</a>
|
||||
<notice-icon class="action"/> -->
|
||||
<a-dropdown>
|
||||
<span class="action ant-dropdown-link user-dropdown-menu">
|
||||
<a-avatar class="avatar" size="small" :src="avatar()"/>
|
||||
@@ -25,10 +30,6 @@
|
||||
<span>账户设置</span>
|
||||
</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2" disabled>
|
||||
<a-icon type="setting"/>
|
||||
<span>测试</span>
|
||||
</a-menu-item>
|
||||
<a-menu-divider/> -->
|
||||
<a-menu-item key="3">
|
||||
<a href="javascript:;" @click="handleLogout">
|
||||
|
@@ -65,6 +65,36 @@ const cmdbRouter = [
|
||||
meta: { title: '属性库', keepAlive: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/acl',
|
||||
name: 'cmdb_acl',
|
||||
component: RouteView,
|
||||
redirect: '/acl/users',
|
||||
meta: { title: '权限管理', icon: 'safety-certificate', permission: ['admin'] },
|
||||
children: [
|
||||
{
|
||||
path: '/acl/users',
|
||||
name: 'acl_users',
|
||||
hideChildrenInMenu: true,
|
||||
component: () => import('@/views/cmdb/acl/users'),
|
||||
meta: { title: 'Users', keepAlive: true }
|
||||
},
|
||||
{
|
||||
path: '/acl/roles',
|
||||
name: 'acl_roles',
|
||||
hideChildrenInMenu: true,
|
||||
component: () => import('@/views/cmdb/acl/roles'),
|
||||
meta: { title: 'Roles', keepAlive: true }
|
||||
},
|
||||
{
|
||||
path: '/acl/resources',
|
||||
name: 'acl_resources',
|
||||
hideChildrenInMenu: true,
|
||||
component: () => import('@/views/cmdb/acl/resources'),
|
||||
meta: { title: 'Resources', keepAlive: true }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
import store from '@/store'
|
||||
import notification from 'ant-design-vue/es/notification'
|
||||
import { VueAxios } from './axios'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
@@ -15,13 +14,6 @@ const service = axios.create({
|
||||
|
||||
const err = (error) => {
|
||||
if (error.response) {
|
||||
const data = error.response.data
|
||||
if (error.response.status === 403) {
|
||||
notification.error({
|
||||
message: 'Forbidden',
|
||||
description: data.message
|
||||
})
|
||||
}
|
||||
if (error.response.status === 401) {
|
||||
store.dispatch('Logout')
|
||||
}
|
||||
|
10
ui/src/views/cmdb/acl/resources.vue
Normal file
10
ui/src/views/cmdb/acl/resources.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
10
ui/src/views/cmdb/acl/roles.vue
Normal file
10
ui/src/views/cmdb/acl/roles.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
10
ui/src/views/cmdb/acl/users.vue
Normal file
10
ui/src/views/cmdb/acl/users.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
Reference in New Issue
Block a user