Browse Source

(*)权限控制完善

master
peng.peng 1 year ago
parent
commit
4032c3333c
  1. 10
      web/client/src/layout/components/header/index.js
  2. 4
      web/client/src/sections/metadataAcquisition/nav-item.js

10
web/client/src/layout/components/header/index.js

@ -66,10 +66,9 @@ const Header = props => {
label: <span style={{ color: 'aliceblue' }}>{user.displayName}</span>,
key: "user",
icon: <img className={styles['header-nav-user-img']} src={`/assets/images/avatar/5.png`} />,
children: [{
label: '退出', key: 'logout'
},
children: [
{
icon: <UserOutlined />,
label: <ResetPasswordModal
editData={user}
triggerRender={<a>重置密码</a>}
@ -78,7 +77,10 @@ const Header = props => {
key="resetPassword"
/>,
key: 'resetPassword'
}
},
{
label: '退出', key: 'logout', icon: <LogoutOutlined />
},
],
}]}
/>

4
web/client/src/sections/metadataAcquisition/nav-item.js

@ -4,9 +4,9 @@ import { Menu } from 'antd';
import { BarChartOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu;
export function getNavItem() {
export function getNavItem(user) {
return (
<SubMenu key="metadataAcquisition" icon={<BarChartOutlined />} title='元数据采集'>
user?.role == '系统管理员' && <SubMenu key="metadataAcquisition" icon={<BarChartOutlined />} title='元数据采集'>
<Menu.Item key="Adapter">
<Link to="/metadataAcquisition/Adapter">适配器管理</Link>
</Menu.Item>

Loading…
Cancel
Save