mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
[PR #11087] [MERGED] fix: Add access control usage to files APIs #109970
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/11087
Author: @tarmst
Created: 3/3/2025
Status: ✅ Merged
Merged: 3/31/2025
Merged by: @tjbck
Base:
dev← Head:fix-files-access-control📝 Commits (1)
1ad8049Add read/write access control for files from knowledge📊 Changes
1 file changed (+104 additions, -7 deletions)
View changed files
📝
backend/open_webui/routers/files.py(+104 -7)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Will link issue when Github puts them back up.
Edit: Issues back up, here it is: https://github.com/open-webui/open-webui/issues/8483
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Fixed
Additional Information
I think there are 2 ways of doing this: Either assigning read/write access to files when the knowledge base gets updated, or just checking the knowledge base's access when necessary. I opted to check the file's knowledge base because it seemed like the less convoluted option and most of the heavy lifting was already done for me in the original issue (thanks!). Let me know if you'd rather it be so that files' access control gets updated.
I know I introduced a somewhat messy function to the top of the routers file (the function isn't even a route) - Let me know if this should go somewhere else & where it should go. Thanks.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.