From c035ff7d1406a06ec49b8d9bea43bf74bc7adad7 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 22 Feb 2026 19:18:25 -0600 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index bbd0ab5185..db1591db94 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -833,6 +833,11 @@ }; const uploadWeb = async (urls) => { + if ($user?.role !== 'admin' && !($user?.permissions?.chat?.web_upload ?? true)) { + toast.error($i18n.t('You do not have permission to upload web content.')); + return; + } + if (!Array.isArray(urls)) { urls = [urls]; }