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 ?
diff --git a/client/src/pages/constellation/vpn.jsx b/client/src/pages/constellation/vpn.jsx index 4efaff7..d0913b3 100644 --- a/client/src/pages/constellation/vpn.jsx +++ b/client/src/pages/constellation/vpn.jsx @@ -31,7 +31,7 @@ export const ConstellationVPN = () => { const [users, setUsers] = useState(null); const [devices, setDevices] = useState(null); const {role} = useClientInfos(); - const isAdmin = role === 2; + const isAdmin = role === "2"; const refreshConfig = async () => { let configAsync = await API.config.get(); diff --git a/client/src/pages/home/index.jsx b/client/src/pages/home/index.jsx index 0f75539..5905e7f 100644 --- a/client/src/pages/home/index.jsx +++ b/client/src/pages/home/index.jsx @@ -89,7 +89,7 @@ const HomePage = () => { const isDark = theme.palette.mode === 'dark'; const isMd = useMediaQuery(theme.breakpoints.up('md')); const {role} = useClientInfos(); - const isAdmin = role === 2; + const isAdmin = role === "2"; const blockStyle = { margin: 0, diff --git a/client/src/pages/market/listing.jsx b/client/src/pages/market/listing.jsx index 7597a02..f7587d9 100644 --- a/client/src/pages/market/listing.jsx +++ b/client/src/pages/market/listing.jsx @@ -112,7 +112,7 @@ const MarketPage = () => { const { appName, appStore } = useParams(); const [search, setSearch] = useState(""); const {role} = useClientInfos(); - const isAdmin = role === 2; + const isAdmin = role === "2"; const backgroundStyle = isDark ? { backgroundColor: 'rgb(0,0,0)', diff --git a/package.json b/package.json index 4b847bc..24fd6d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cosmos-server", - "version": "0.10.0-unstable18", + "version": "0.10.0-unstable19", "description": "", "main": "test-server.js", "bugs": {