aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/components/SettingsMenu.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-27 17:27:47 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-27 17:27:47 -0700
commit37e339f4041d230175f7951f924df8adc231a14f (patch)
tree49e51849bd173bc9580634c2a6831858bb0da809 /modern/src/settings/components/SettingsMenu.js
parentc603bec94e16787c355c74ebc7e7602ff3f20ae2 (diff)
downloadtrackermap-web-37e339f4041d230175f7951f924df8adc231a14f.tar.gz
trackermap-web-37e339f4041d230175f7951f924df8adc231a14f.tar.bz2
trackermap-web-37e339f4041d230175f7951f924df8adc231a14f.zip
Fix manager issue
Diffstat (limited to 'modern/src/settings/components/SettingsMenu.js')
-rw-r--r--modern/src/settings/components/SettingsMenu.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/modern/src/settings/components/SettingsMenu.js b/modern/src/settings/components/SettingsMenu.js
index cb2dba2f..fae3ad86 100644
--- a/modern/src/settings/components/SettingsMenu.js
+++ b/modern/src/settings/components/SettingsMenu.js
@@ -15,7 +15,7 @@ import PublishIcon from '@mui/icons-material/Publish';
import { Link, useLocation } from 'react-router-dom';
import { useSelector } from 'react-redux';
import { useTranslation } from '../../common/components/LocalizationProvider';
-import { useAdministrator, useReadonly } from '../../common/util/permissions';
+import { useAdministrator, useManager, useReadonly } from '../../common/util/permissions';
const MenuItem = ({
title, link, icon, selected,
@@ -32,6 +32,7 @@ const SettingsMenu = () => {
const readonly = useReadonly();
const admin = useAdministrator();
+ const manager = useManager();
const userId = useSelector((state) => state.session.user?.id);
return (
@@ -102,16 +103,18 @@ const SettingsMenu = () => {
</>
)}
</List>
- {admin && (
+ {manager && (
<>
<Divider />
<List>
- <MenuItem
- title={t('settingsServer')}
- link="/settings/server"
- icon={<StorageIcon />}
- selected={location.pathname === '/settings/server'}
- />
+ {admin && (
+ <MenuItem
+ title={t('settingsServer')}
+ link="/settings/server"
+ icon={<StorageIcon />}
+ selected={location.pathname === '/settings/server'}
+ />
+ )}
<MenuItem
title={t('settingsUsers')}
link="/settings/users"