Hide system log and login log tabs for non-admin users

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-11 16:53:19 +00:00
parent 07fcb09cc6
commit 0deebcfc88

View File

@ -334,6 +334,8 @@ const Setting = () => {
label: intl.get('通知设置'), label: intl.get('通知设置'),
children: <NotificationSetting data={notificationInfo} />, children: <NotificationSetting data={notificationInfo} />,
}, },
...(user?.role === 0
? [
{ {
key: 'syslog', key: 'syslog',
label: intl.get('系统日志'), label: intl.get('系统日志'),
@ -344,6 +346,8 @@ const Setting = () => {
label: intl.get('登录日志'), label: intl.get('登录日志'),
children: <LoginLog height={height} data={loginLogData} />, children: <LoginLog height={height} data={loginLogData} />,
}, },
]
: []),
...(user?.role === 0 && !isDemoEnv ...(user?.role === 0 && !isDemoEnv
? [ ? [
{ {