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,16 +334,20 @@ const Setting = () => {
label: intl.get('通知设置'),
children: <NotificationSetting data={notificationInfo} />,
},
{
key: 'syslog',
label: intl.get('系统日志'),
children: <SystemLog height={height} theme={theme} />,
},
{
key: 'login',
label: intl.get('登录日志'),
children: <LoginLog height={height} data={loginLogData} />,
},
...(user?.role === 0
? [
{
key: 'syslog',
label: intl.get('系统日志'),
children: <SystemLog height={height} theme={theme} />,
},
{
key: 'login',
label: intl.get('登录日志'),
children: <LoginLog height={height} data={loginLogData} />,
},
]
: []),
...(user?.role === 0 && !isDemoEnv
? [
{