From 494c386ca843e46254634125a8f01804b5e23076 Mon Sep 17 00:00:00 2001 From: "Apple\\Apple" Date: Wed, 4 Jun 2025 14:41:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(sidebar):=20fix=20the=20side?= =?UTF-8?q?bar=20user=20permission=20to=20display=20navigation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/layout/SiderBar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/components/layout/SiderBar.js b/web/src/components/layout/SiderBar.js index 30117eee..48e15f34 100644 --- a/web/src/components/layout/SiderBar.js +++ b/web/src/components/layout/SiderBar.js @@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next'; import { isAdmin, + isRoot, showError } from '../../helpers/index.js'; @@ -218,15 +219,17 @@ const SiderBar = () => { itemKey: 'user', to: '/user', icon: , + className: isAdmin() ? '' : 'tableHiddle', }, { text: t('系统设置'), itemKey: 'setting', to: '/setting', icon: , + className: isRoot() ? '' : 'tableHiddle', }, ], - [isAdmin(), t], + [isAdmin(), isRoot(), t], ); const chatMenuItems = useMemo(