feat: add ENABLE_ADMIN_CHAT_ACCESS to control admin access to user chats

This commit is contained in:
Jun Siang Cheah
2024-08-04 15:16:14 +01:00
parent a75a9c953a
commit 565f40c642
5 changed files with 15 additions and 3 deletions
+1
View File
@@ -149,6 +149,7 @@ type Config = {
enable_web_search?: boolean;
enable_image_generation: boolean;
enable_admin_export: boolean;
enable_admin_chat_access: boolean;
enable_community_sharing: boolean;
};
oauth: {
+1 -1
View File
@@ -307,7 +307,7 @@
<td class="px-3 py-2 text-right">
<div class="flex justify-end w-full">
{#if user.role !== 'admin'}
{#if $config.features.enable_admin_chat_access && user.role !== 'admin'}
<Tooltip content={$i18n.t('Chats')}>
<button
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"