Skip to content

Commit c035ff7

Browse files
committed
refac
1 parent 2558fe1 commit c035ff7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/lib/components/chat/Chat.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,11 @@
833833
};
834834
835835
const uploadWeb = async (urls) => {
836+
if ($user?.role !== 'admin' && !($user?.permissions?.chat?.web_upload ?? true)) {
837+
toast.error($i18n.t('You do not have permission to upload web content.'));
838+
return;
839+
}
840+
836841
if (!Array.isArray(urls)) {
837842
urls = [urls];
838843
}

0 commit comments

Comments
 (0)