diff options
author | Anton Tananaev <anton@traccar.org> | 2023-01-22 09:58:15 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-01-22 09:58:15 -0800 |
commit | 390d4ee3936750285d70dfbd88791f7f61ee6b2f (patch) | |
tree | ea34a4034e367aa8e7daeb047d69cc381961315c /modern | |
parent | 8f35d7f5655c5f5652936614bca48482ff48fb28 (diff) | |
download | trackermap-web-390d4ee3936750285d70dfbd88791f7f61ee6b2f.tar.gz trackermap-web-390d4ee3936750285d70dfbd88791f7f61ee6b2f.tar.bz2 trackermap-web-390d4ee3936750285d70dfbd88791f7f61ee6b2f.zip |
Commands for readonly users
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/common/components/StatusCard.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modern/src/common/components/StatusCard.js b/modern/src/common/components/StatusCard.js index 386dd3f1..67d630e6 100644 --- a/modern/src/common/components/StatusCard.js +++ b/modern/src/common/components/StatusCard.js @@ -27,7 +27,7 @@ import PendingIcon from '@mui/icons-material/Pending'; import { useTranslation } from './LocalizationProvider'; import RemoveDialog from './RemoveDialog'; import PositionValue from './PositionValue'; -import { useDeviceReadonly, useRestriction } from '../util/permissions'; +import { useDeviceReadonly } from '../util/permissions'; import usePositionAttributes from '../attributes/usePositionAttributes'; import { devicesActions } from '../../store'; import { useCatch, useCatchCallback } from '../../reactHelper'; @@ -116,7 +116,6 @@ const StatusCard = ({ deviceId, position, onClose, disableActions, desktopPaddin const dispatch = useDispatch(); const t = useTranslation(); - const readonly = useRestriction('readonly'); const deviceReadonly = useDeviceReadonly(); const device = useSelector((state) => state.devices.items[deviceId]); @@ -240,7 +239,7 @@ const StatusCard = ({ deviceId, position, onClose, disableActions, desktopPaddin </IconButton> <IconButton onClick={() => navigate(`/settings/command-send/${deviceId}`)} - disabled={disableActions || readonly} + disabled={disableActions} > <PublishIcon /> </IconButton> |