From 92022dd81fc21b063b0c4012b017a815b40b5067 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 15 Jan 2025 23:12:40 -0800 Subject: [PATCH] enh: image permissions --- src/lib/components/chat/Controls/Controls.svelte | 2 +- src/lib/components/chat/MessageInput/InputMenu.svelte | 2 +- src/lib/components/chat/Messages/ResponseMessage.svelte | 2 +- src/lib/components/chat/Navbar.svelte | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/components/chat/Controls/Controls.svelte b/src/lib/components/chat/Controls/Controls.svelte index 5b2a289e5..2a0b40076 100644 --- a/src/lib/components/chat/Controls/Controls.svelte +++ b/src/lib/components/chat/Controls/Controls.svelte @@ -30,7 +30,7 @@ - {#if $user.role === 'admin' || $user.permissions.chat?.controls} + {#if $user.role === 'admin' || $user?.permissions.chat?.controls}
{#if chatFiles.length > 0} diff --git a/src/lib/components/chat/MessageInput/InputMenu.svelte b/src/lib/components/chat/MessageInput/InputMenu.svelte index a37653d99..95807e81b 100644 --- a/src/lib/components/chat/MessageInput/InputMenu.svelte +++ b/src/lib/components/chat/MessageInput/InputMenu.svelte @@ -114,7 +114,7 @@
{/if} - {#if $config?.features?.enable_web_search && ($user.role === 'admin' || $user.permissions.features?.web_search)} + {#if $config?.features?.enable_web_search && ($user.role === 'admin' || $user?.permissions?.features?.web_search)} - {#if $config?.features.enable_image_generation && !readOnly} + {#if $config?.features.enable_image_generation && ($user.role === 'admin' || $user?.permissions?.features?.image_generation) && !readOnly}