From 0141f91dda8d114214e195a949af54150c7ff3a0 Mon Sep 17 00:00:00 2001
From: Timothy Carambat <rambat1010@gmail.com>
Date: Wed, 7 Aug 2024 08:39:07 -0700
Subject: [PATCH] Hide upload element for default role users (#2061)

resolves #2060
---
 .../ChatContainer/PromptInput/AttachItem/index.jsx            | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx
index 74f22f90c..bebbfe570 100644
--- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx
+++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx
@@ -1,3 +1,4 @@
+import useUser from "@/hooks/useUser";
 import { PaperclipHorizontal } from "@phosphor-icons/react";
 import { Tooltip } from "react-tooltip";
 
@@ -6,6 +7,9 @@ import { Tooltip } from "react-tooltip";
  * @returns
  */
 export default function AttachItem() {
+  const { user } = useUser();
+  if (!!user && user.role === "default") return null;
+
   return (
     <>
       <button
-- 
GitLab