From 0deebcfc88affa37649fad1db297b06517d83b93 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Nov 2025 16:53:19 +0000 Subject: [PATCH] Hide system log and login log tabs for non-admin users Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- src/pages/setting/index.tsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/pages/setting/index.tsx b/src/pages/setting/index.tsx index 141713fd..d2d03f58 100644 --- a/src/pages/setting/index.tsx +++ b/src/pages/setting/index.tsx @@ -334,16 +334,20 @@ const Setting = () => { label: intl.get('通知设置'), children: , }, - { - key: 'syslog', - label: intl.get('系统日志'), - children: , - }, - { - key: 'login', - label: intl.get('登录日志'), - children: , - }, + ...(user?.role === 0 + ? [ + { + key: 'syslog', + label: intl.get('系统日志'), + children: , + }, + { + key: 'login', + label: intl.get('登录日志'), + children: , + }, + ] + : []), ...(user?.role === 0 && !isDemoEnv ? [ {