From 4993f83ad1a5ad78a0b076503ab8c0b8f1bbf073 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 18 Jul 2022 16:51:46 -0700 Subject: Option to disable email change --- modern/src/settings/components/CollectionFab.js | 4 ++-- modern/src/settings/components/SettingsMenu.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modern/src/settings/components') diff --git a/modern/src/settings/components/CollectionFab.js b/modern/src/settings/components/CollectionFab.js index b1230733..3c1fa783 100644 --- a/modern/src/settings/components/CollectionFab.js +++ b/modern/src/settings/components/CollectionFab.js @@ -3,7 +3,7 @@ import { Fab } from '@mui/material'; import makeStyles from '@mui/styles/makeStyles'; import AddIcon from '@mui/icons-material/Add'; import { useNavigate } from 'react-router-dom'; -import { useReadonly } from '../../common/util/permissions'; +import { useRestriction } from '../../common/util/permissions'; const useStyles = makeStyles((theme) => ({ fab: { @@ -20,7 +20,7 @@ const CollectionFab = ({ editPath, disabled }) => { const classes = useStyles(); const navigate = useNavigate(); - const readonly = useReadonly(); + const readonly = useRestriction('readonly'); if (!readonly && !disabled) { return ( diff --git a/modern/src/settings/components/SettingsMenu.js b/modern/src/settings/components/SettingsMenu.js index 51d9b8fc..7a1bf1b3 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, useManager, useReadonly } from '../../common/util/permissions'; +import { useAdministrator, useManager, useRestriction } from '../../common/util/permissions'; import useFeatures from '../../common/util/useFeatures'; const MenuItem = ({ @@ -31,7 +31,7 @@ const SettingsMenu = () => { const t = useTranslation(); const location = useLocation(); - const readonly = useReadonly(); + const readonly = useRestriction('readonly'); const admin = useAdministrator(); const manager = useManager(); const userId = useSelector((state) => state.session.user.id); -- cgit v1.2.3