mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 19:38:46 -05:00
[PR #23636] [CLOSED] fix: prevent KB collaborators from permanently deleting files they do not own #27293
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/23636
Author: @Classic298
Created: 4/12/2026
Status: ❌ Closed
Base:
dev← Head:fix/kb-file-deletion-ownership📝 Commits (2)
481ac79fix: prevent KB collaborators from permanently deleting files they do not own4fc7fddmerge: resolve conflicts with upstream async DB migration📊 Changes
1 file changed (+34 additions, -11 deletions)
View changed files
📝
backend/open_webui/routers/knowledge.py(+34 -11)📄 Description
The file/remove endpoint checked KB write access but not file ownership before calling Files.delete_file_by_id. A collaborator with KB write access could permanently destroy any file linked to the shared KB, affecting all other KBs and chats that reference it.
Collaborators can still unlink files from the KB. Only the file owner or an admin can permanently delete the underlying file.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.