use demo role to show/hide features

This commit is contained in:
Alex Holliday committed 2024-09-06 11:51:55 -07:00
1 parent 63da8bd571
commit 7f9950b9e5
5 files changed
+16 -13

No files matched your search

+2 -1
View File
@@ -92,7 +92,8 @@ function Sidebar() {
const [popup, setPopup] = useState();
const { user } = useSelector((state) => state.auth);
if (!user.role.includes("superadmin")) {
// Remove demo password if demo
if (user.role.includes("demo")) {
menu[3].nested = menu[3].nested.filter((item) => {
return item.name !== "Password";
});
@@ -331,7 +331,7 @@ const ProfilePanel = () => {
borderColor: theme.palette.border.light,
}}
/>
{user.role.includes("superadmin") && (
{!user.role.includes("demo") && (
<Box component="form" noValidate spellCheck="false">
<Box mb={theme.spacing(6)}>
<Typography component="h1">Delete account</Typography>