[bug] fix missing staff setting (#13386)

- NOTIFICATION_ERROR_REPORT setting was hidden
This commit is contained in:
Oliver authored and GitHub committed 2026-11-26 19:14:44 +11:00
1 parent 4c06cfb237
commit 8e83a8a9a1
2 files changed
+13 -7

No files matched your search

+1 -1
View File
@@ -283,7 +283,7 @@ USER_SETTINGS: dict[str, InvenTreeSettingsKeyType] = {
}, },
'NOTIFICATION_ERROR_REPORT': { 'NOTIFICATION_ERROR_REPORT': {
'name': _('Receive error reports'), 'name': _('Receive error reports'),
'description': _('Receive notifications for system errors'), 'description': _('Receive notifications for system errors (staff users only)'),
'default': True, 'default': True,
'validator': bool, 'validator': bool,
}, },
@@ -113,11 +113,17 @@ export default function UserSettings() {
label: t`Notifications`, label: t`Notifications`,
icon: <IconBellCog />, icon: <IconBellCog />,
content: ( content: (
<PluginSettingsGroup <Stack gap='xs'>
mixin='notification' {/* Error reports are only sent to staff users */}
global={false} {user?.is_staff && (
message={t`The settings below are specific to each available notification method`} <UserSettingList keys={['NOTIFICATION_ERROR_REPORT']} />
/> )}
<PluginSettingsGroup
mixin='notification'
global={false}
message={t`The settings below are specific to each available notification method`}
/>
</Stack>
) )
}, },
{ {
@@ -135,7 +141,7 @@ export default function UserSettings() {
) )
} }
]; ];
}, []); }, [user]);
if (!isLoggedIn()) { if (!isLoggedIn()) {
return <Skeleton />; return <Skeleton />;