🐛 fix(sidebar): fix the sidebar user permission to display navigation
This commit is contained in:
@@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
isAdmin,
|
isAdmin,
|
||||||
|
isRoot,
|
||||||
showError
|
showError
|
||||||
} from '../../helpers/index.js';
|
} from '../../helpers/index.js';
|
||||||
|
|
||||||
@@ -218,15 +219,17 @@ const SiderBar = () => {
|
|||||||
itemKey: 'user',
|
itemKey: 'user',
|
||||||
to: '/user',
|
to: '/user',
|
||||||
icon: <IconUser />,
|
icon: <IconUser />,
|
||||||
|
className: isAdmin() ? '' : 'tableHiddle',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: t('系统设置'),
|
text: t('系统设置'),
|
||||||
itemKey: 'setting',
|
itemKey: 'setting',
|
||||||
to: '/setting',
|
to: '/setting',
|
||||||
icon: <IconSetting />,
|
icon: <IconSetting />,
|
||||||
|
className: isRoot() ? '' : 'tableHiddle',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[isAdmin(), t],
|
[isAdmin(), isRoot(), t],
|
||||||
);
|
);
|
||||||
|
|
||||||
const chatMenuItems = useMemo(
|
const chatMenuItems = useMemo(
|
||||||
|
|||||||
Reference in New Issue
Block a user