diff --git a/client/src/layout/MainLayout/Drawer/DrawerContent/Navigation/NavItem.jsx b/client/src/layout/MainLayout/Drawer/DrawerContent/Navigation/NavItem.jsx index 0537d1e..34c1a38 100644 --- a/client/src/layout/MainLayout/Drawer/DrawerContent/Navigation/NavItem.jsx +++ b/client/src/layout/MainLayout/Drawer/DrawerContent/Navigation/NavItem.jsx @@ -19,7 +19,7 @@ const NavItem = ({ item, level }) => { const menu = useSelector((state) => state.menu); const { drawerOpen, openItem } = menu; const {role} = useClientInfos(); - const isAdmin = role === 2; + const isAdmin = role === "2"; if (item.adminOnly && !isAdmin) { return null; diff --git a/client/src/pages/config/users/configman.jsx b/client/src/pages/config/users/configman.jsx index d42acfb..c61ee6c 100644 --- a/client/src/pages/config/users/configman.jsx +++ b/client/src/pages/config/users/configman.jsx @@ -40,7 +40,7 @@ const ConfigManagement = () => { const [uploadingBackground, setUploadingBackground] = React.useState(false); const [saveLabel, setSaveLabel] = React.useState("Save"); const {role} = useClientInfos(); - const isAdmin = role === 2; + const isAdmin = role === "2"; function refresh() { API.config.get().then((res) => { diff --git a/client/src/pages/constellation/addDevice.jsx b/client/src/pages/constellation/addDevice.jsx index 3609d86..0c32453 100644 --- a/client/src/pages/constellation/addDevice.jsx +++ b/client/src/pages/constellation/addDevice.jsx @@ -79,7 +79,7 @@ const AddDeviceModal = ({ users, config, refreshConfig, devices }) => { const [isDone, setIsDone] = useState(null); const canvasRef = React.useRef(null); const {role, nickname} = useClientInfos(); - const isAdmin = role === 2; + const isAdmin = role === "2"; let firstIP = "192.168.201.2/24"; if (devices && devices.length > 0) { diff --git a/client/src/pages/constellation/index.jsx b/client/src/pages/constellation/index.jsx index b96d012..93d6e83 100644 --- a/client/src/pages/constellation/index.jsx +++ b/client/src/pages/constellation/index.jsx @@ -15,7 +15,7 @@ import { ConstellationDNS } from './dns'; const ConstellationIndex = () => { const {role} = useClientInfos(); - const isAdmin = role === 2; + const isAdmin = role === "2"; return isAdmin ?