mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-28 21:05:17 +02:00
Fix noauth FE
This commit is contained in:
@@ -74,13 +74,15 @@ export const Header: React.FC<HeaderProps> = ({ user }) => {
|
|||||||
"w-36 overflow-hidden shadow-xl z-10 text-sm text-gray-300"
|
"w-36 overflow-hidden shadow-xl z-10 text-sm text-gray-300"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{user?.role === "admin" && (
|
{/* Show connector option if (1) auth is disabled or (2) user is an admin */}
|
||||||
|
{!user ||
|
||||||
|
(user.role === "admin" && (
|
||||||
<Link href="/admin/indexing/status">
|
<Link href="/admin/indexing/status">
|
||||||
<div className="flex py-2 px-3 cursor-pointer hover:bg-gray-500 border-b border-gray-500">
|
<div className="flex py-2 px-3 cursor-pointer hover:bg-gray-500 border-b border-gray-500">
|
||||||
Connectors
|
Connectors
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
))}
|
||||||
{user && (
|
{user && (
|
||||||
<div
|
<div
|
||||||
className="flex py-2 px-3 cursor-pointer hover:bg-gray-500"
|
className="flex py-2 px-3 cursor-pointer hover:bg-gray-500"
|
||||||
|
Reference in New Issue
Block a user