From cc34066d0a0daf4c03c1d25c8daacaf9b5d67ce3 Mon Sep 17 00:00:00 2001 From: Lucas Leite Date: Thu, 19 Sep 2024 17:02:11 -0300 Subject: [PATCH] Allow managers to see device's users --- src/settings/DevicesPage.jsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/settings/DevicesPage.jsx b/src/settings/DevicesPage.jsx index 08790cbd..5e204c3c 100644 --- a/src/settings/DevicesPage.jsx +++ b/src/settings/DevicesPage.jsx @@ -14,7 +14,7 @@ import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; import { formatTime } from '../common/util/formatter'; -import { useAdministrator, useDeviceReadonly } from '../common/util/permissions'; +import { useDeviceReadonly, useManager } from '../common/util/permissions'; import useSettingsStyles from './common/useSettingsStyles'; import DeviceUsersValue from './components/DeviceUsersValue'; @@ -25,7 +25,7 @@ const DevicesPage = () => { const groups = useSelector((state) => state.groups.items); - const admin = useAdministrator(); + const manager = useManager(); const deviceReadonly = useDeviceReadonly(); const [timestamp, setTimestamp] = useState(Date.now()); @@ -73,7 +73,7 @@ const DevicesPage = () => { {t('deviceModel')} {t('deviceContact')} {t('userExpirationTime')} - {admin && {t('settingsUsers')}} + {manager && {t('settingsUsers')}} @@ -87,7 +87,7 @@ const DevicesPage = () => { {item.model} {item.contact} {formatTime(item.expirationTime, 'date')} - {admin && } + {manager && } { /> - )) : ()} + )) : ()} - + { )} label={t('notificationAlways')} labelPlacement="start" - disabled={!admin} + disabled={!manager} />