mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #23587] [CLOSED] fix: pass db session to filter_allowed_access_grants in update_note_access_by_id #66123
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/23587
Author: @kuishou68
Created: 4/11/2026
Status: ❌ Closed
Base:
main← Head:fix/issue-23586-notes-access-db-param📝 Commits (1)
941bbcbfix: pass db session to filter_allowed_access_grants in update_note_access_by_id (Closes #23586)📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
backend/open_webui/routers/notes.py(+1 -0)📄 Description
Closes #23586
Problem
In
backend/open_webui/routers/notes.py, theupdate_note_access_by_idendpoint callsfilter_allowed_access_grantswithout passing thedb(SQLAlchemy session) parameter.The
filter_allowed_access_grantsfunction internally callshas_permission()which callsGroups.get_groups_by_member_id(user_id, db=db). Without a validdbsession, group-based permission lookups will fail, meaning non-admin users with group-grantedsharing.public_notespermission will incorrectly have their access grants stripped/filtered when callingPOST /{id}/access/update.The same function call in
update_note_by_id(also innotes.py) correctly passesdb=db:Fix
Added the missing
db=dbkeyword argument to thefilter_allowed_access_grantscall inupdate_note_access_by_id:Signed-off-by: cocoon 54054995+kuishou68@users.noreply.github.com
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.