mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[GH-ISSUE #17432] issue: Incorrect logic about collection permission #18282
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chayaziv on GitHub (Sep 14, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17432
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.27
Ollama Version (if applicable)
No response
Operating System
Windows 10
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When a user logs in with USER permission and creates a private collection and uploads a file to the collection, then attaches the private collection to the chat with # and asks a question about the content - the model should provide an answer based on the content of the file.
Actual Behavior
Due to a logical issue in checking permissions for the collection when BY_PASS_EMBEDDING = TRUE, the model cannot see the files in the collection and therefore responds with an answer like: "I do not see the file..."
Steps to Reproduce
set BYPASS_EMBEDDING_AND_RETRIEVAL = TRUE.
Log in with USER permission
Create a private collection without a group
Add the attach file to the collection
Add the collection to the chat with #
And ask: "Which design library should be used according to the instructions in the file?"
React Homework Assignment Requirements.pdf
Logs & Screenshots
Additional Information
🛠 Root Cause Analysis
The issue is in the file:
backend/open_webui/retrieval/utils.pyat lines 582-585:The function
has_accessdoes not include the owner in the list of permitted users when the knowledge base is private.✅ Comparison with Working Code
In the file:
backend/open_webui/models/knowledge.py(lines 171-174)the correct pattern is used:
💡 Proposed Fix
Add the missing owner check in the file:
backend/open_webui/retrieval/utils.py@tjbck commented on GitHub (Sep 15, 2025):
Addressed with
a51f0c30ecin dev!