From aceed36114c2898f47d0cff50f0ae87edf8fafd0 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 25 Nov 2026 05:14:02 +0400 Subject: [PATCH] refac --- backend/open_webui/models/chats.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/backend/open_webui/models/chats.py b/backend/open_webui/models/chats.py index 6fe37f5a97..a916fd6161 100644 --- a/backend/open_webui/models/chats.py +++ b/backend/open_webui/models/chats.py @@ -1961,12 +1961,7 @@ class ChatTable: chat = result.first() if not chat: return False - if ( - chat.user_id == user.id - or user.role == 'admin' - and permission == 'read' - and ENABLE_ADMIN_CHAT_ACCESS - ): + if chat.user_id == user.id or user.role == 'admin' and permission == 'read' and ENABLE_ADMIN_CHAT_ACCESS: return True from open_webui.models.shared_chats import SharedChats