mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-27 06:46:30 -05:00
get_chat_by_id sent admins down a branch that returned the chat only when ENABLE_ADMIN_CHAT_ACCESS was on, or the chat was internal, and never fell through to the access-grant and shared-folder checks. With the setting off, an admin was therefore denied a chat that had been deliberately shared with them, either directly or through a shared folder, while any non-admin holding the same grant could open it. The admin role removed access the user had been given rather than only closing the admin-only path. Try the admin path first, then let everyone fall through to the grant and folder checks. ENABLE_ADMIN_CHAT_ACCESS=false still closes the admin-only route to other users' chats, and internal chats stay reachable.