aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/common/attributes/useCommonUserAttributes.js4
-rw-r--r--modern/src/common/util/useFeatures.js2
-rw-r--r--modern/src/settings/components/SettingsMenu.js14
-rw-r--r--web/l10n/en.json1
4 files changed, 15 insertions, 6 deletions
diff --git a/modern/src/common/attributes/useCommonUserAttributes.js b/modern/src/common/attributes/useCommonUserAttributes.js
index ddd5d970..81ceaca7 100644
--- a/modern/src/common/attributes/useCommonUserAttributes.js
+++ b/modern/src/common/attributes/useCommonUserAttributes.js
@@ -33,6 +33,10 @@ export default (t) => useMemo(() => ({
name: t('attributeNotificationTokens'),
type: 'string',
},
+ 'ui.disableGroups': {
+ name: t('attributeUiDisableGroups'),
+ type: 'boolean',
+ },
'ui.disableEvents': {
name: t('attributeUiDisableEvents'),
type: 'boolean',
diff --git a/modern/src/common/util/useFeatures.js b/modern/src/common/util/useFeatures.js
index 7a7ffcd2..995fbf86 100644
--- a/modern/src/common/util/useFeatures.js
+++ b/modern/src/common/util/useFeatures.js
@@ -19,6 +19,7 @@ export default () => useSelector((state) => {
const disableVehicleFetures = get(server, user, 'ui.disableVehicleFetures');
const disableDrivers = disableVehicleFetures || get(server, user, 'ui.disableDrivers');
const disableMaintenance = disableVehicleFetures || get(server, user, 'ui.disableMaintenance');
+ const disableGroups = get(server, user, 'ui.disableGroups');
const disableEvents = get(server, user, 'ui.disableEvents');
const disableComputedAttributes = get(server, user, 'ui.disableComputedAttributes');
const disableCalendars = get(server, user, 'ui.disableCalendars');
@@ -26,6 +27,7 @@ export default () => useSelector((state) => {
return {
disableDrivers,
disableMaintenance,
+ disableGroups,
disableEvents,
disableComputedAttributes,
disableCalendars,
diff --git a/modern/src/settings/components/SettingsMenu.js b/modern/src/settings/components/SettingsMenu.js
index 181cd74c..51d9b8fc 100644
--- a/modern/src/settings/components/SettingsMenu.js
+++ b/modern/src/settings/components/SettingsMenu.js
@@ -67,12 +67,14 @@ const SettingsMenu = () => {
icon={<CreateIcon />}
selected={location.pathname.startsWith('/settings/geofence')}
/>
- <MenuItem
- title={t('settingsGroups')}
- link="/settings/groups"
- icon={<FolderIcon />}
- selected={location.pathname.startsWith('/settings/group')}
- />
+ {!features.disableGroups && (
+ <MenuItem
+ title={t('settingsGroups')}
+ link="/settings/groups"
+ icon={<FolderIcon />}
+ selected={location.pathname.startsWith('/settings/group')}
+ />
+ )}
{!features.disableDrivers && (
<MenuItem
title={t('sharedDrivers')}
diff --git a/web/l10n/en.json b/web/l10n/en.json
index 64f56017..4da2fdf1 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -114,6 +114,7 @@
"attributeMailSmtpAuth": "Mail: SMTP Auth Enable",
"attributeMailSmtpUsername": "Mail: SMTP Username",
"attributeMailSmtpPassword": "Mail: SMTP Password",
+ "attributeUiDisableGroups": "UI: Disable Groups",
"attributeUiDisableEvents": "UI: Disable Events",
"attributeUiDisableVehicleFetures": "UI: Disable Vehicle Fetures",
"attributeUiDisableDrivers": "UI: Disable Drivers",