From a3d6d876c4f9a38f5f205f595c963f8ce6215723 Mon Sep 17 00:00:00 2001
From: timothycarambat <rambat1010@gmail.com>
Date: Thu, 24 Aug 2023 08:20:44 -0700
Subject: [PATCH] check role for settings when in mum

---
 frontend/src/components/Sidebar/index.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/frontend/src/components/Sidebar/index.jsx b/frontend/src/components/Sidebar/index.jsx
index c273f987f..311208127 100644
--- a/frontend/src/components/Sidebar/index.jsx
+++ b/frontend/src/components/Sidebar/index.jsx
@@ -334,7 +334,8 @@ function LogoutButton() {
 
 function SettingsButton({ onClick }) {
   const { user } = useUser();
-  if (!!user) return null;
+
+  if (!!user && user?.role !== "admin") return null;
   return (
     <button
       onClick={onClick}