Skip to content

Commit 9a347b0

Browse files
authored
Update knowledge.py (open-webui#25053)
1 parent 4278388 commit 9a347b0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

backend/open_webui/routers/knowledge.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -847,10 +847,7 @@ async def remove_file_from_knowledge_by_id(
847847
log.debug(e)
848848
pass
849849

850-
# Only the file owner or an admin may permanently delete the underlying
851-
# file. Collaborators with KB write access can unlink a file from the
852-
# knowledge base but must not be able to destroy files they do not own,
853-
# as the same file may be referenced by other KBs and chats.
850+
# Anyone with write permission or higher can delete files
854851
if delete_file and (file.user_id == user.id or user.role == 'admin'):
855852
try:
856853
# Remove the file's collection from vector database

0 commit comments

Comments
 (0)