Merge pull request #4351 from cheahjs/feat/disable-admin-chat-view

feat: add ENABLE_ADMIN_CHAT_ACCESS to control admin access to user chats
This commit is contained in:
Timothy Jaeryang Baek
2024-08-04 16:37:30 +02:00
committed by GitHub
5 changed files with 15 additions and 3 deletions

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: {

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"