diff options
author | Anton Tananaev <anton@traccar.org> | 2023-02-23 11:53:36 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-02-23 11:53:36 -0800 |
commit | 0ca058f1c69827b41fa3a414917ab1cbebfb84e6 (patch) | |
tree | c617a73afeececac75371c2b6d6225d7b1cf00d6 /modern/src/settings/components/SettingsMenu.js | |
parent | 5f65762c67aacc9a621983fcb06107b982792c3f (diff) | |
download | trackermap-web-0ca058f1c69827b41fa3a414917ab1cbebfb84e6.tar.gz trackermap-web-0ca058f1c69827b41fa3a414917ab1cbebfb84e6.tar.bz2 trackermap-web-0ca058f1c69827b41fa3a414917ab1cbebfb84e6.zip |
Allow device readonly linking
Diffstat (limited to 'modern/src/settings/components/SettingsMenu.js')
-rw-r--r-- | modern/src/settings/components/SettingsMenu.js | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/modern/src/settings/components/SettingsMenu.js b/modern/src/settings/components/SettingsMenu.js index c732fc9f..eecdad79 100644 --- a/modern/src/settings/components/SettingsMenu.js +++ b/modern/src/settings/components/SettingsMenu.js @@ -17,7 +17,7 @@ import { Link, useLocation } from 'react-router-dom'; import { useSelector } from 'react-redux'; import { useTranslation } from '../../common/components/LocalizationProvider'; import { - useAdministrator, useDeviceReadonly, useManager, useRestriction, + useAdministrator, useManager, useRestriction, } from '../../common/util/permissions'; import useFeatures from '../../common/util/useFeatures'; @@ -35,7 +35,6 @@ const SettingsMenu = () => { const location = useLocation(); const readonly = useRestriction('readonly'); - const deviceReadonly = useDeviceReadonly(); const admin = useAdministrator(); const manager = useManager(); const userId = useSelector((state) => state.session.user.id); @@ -65,14 +64,12 @@ const SettingsMenu = () => { icon={<PersonIcon />} selected={location.pathname === `/settings/user/${userId}`} /> - {!deviceReadonly && ( - <MenuItem - title={t('deviceTitle')} - link="/settings/devices" - icon={<SmartphoneIcon />} - selected={location.pathname.startsWith('/settings/device')} - /> - )} + <MenuItem + title={t('deviceTitle')} + link="/settings/devices" + icon={<SmartphoneIcon />} + selected={location.pathname.startsWith('/settings/device')} + /> <MenuItem title={t('sharedGeofences')} link="/geofences" |