@@ -33,6 +33,8 @@ import {
3333 saveMcpOAuthDraft ,
3434} from "@/features/chat/mcpOAuthDraft" ;
3535import { clearEditorHistory , resetEditor } from "@/features/chat/utils" ;
36+ import { useRole } from "@/features/auth/useRole" ;
37+ import { OrgRole } from "@sourcebot/db" ;
3638
3739interface ConnectorsMenuProps {
3840 selectedSearchScopes : SearchScope [ ] ;
@@ -76,6 +78,7 @@ export const ConnectorsMenu = ({
7678 const queryClient = useQueryClient ( ) ;
7779 const router = useRouter ( ) ;
7880 const { toast } = useToast ( ) ;
81+ const isOwner = useRole ( ) === OrgRole . OWNER ;
7982
8083 const { data : servers = [ ] , isError, isLoading, refetch } = useQuery ( {
8184 queryKey : mcpQueryKeys . serversWithStatus ,
@@ -297,13 +300,15 @@ export const ConnectorsMenu = ({
297300 < CableIcon className = "w-4 h-4" />
298301 My connectors
299302 </ DropdownMenuItem >
300- < DropdownMenuItem
301- className = "gap-2 text-muted-foreground"
302- onSelect = { ( ) => router . push ( `/settings/workspaceAskAgent` ) }
303- >
304- < SettingsIcon className = "w-4 h-4" />
305- Workspace connectors
306- </ DropdownMenuItem >
303+ { isOwner && (
304+ < DropdownMenuItem
305+ className = "gap-2 text-muted-foreground"
306+ onSelect = { ( ) => router . push ( `/settings/workspaceAskAgent` ) }
307+ >
308+ < SettingsIcon className = "w-4 h-4" />
309+ Workspace connectors
310+ </ DropdownMenuItem >
311+ ) }
307312 </ DropdownMenuSubContent >
308313 </ DropdownMenuSub >
309314 </ DropdownMenuContent >
0 commit comments