[PR #23698] [CLOSED] fix: add missing db parameter to filter_allowed_access_grants in update_note_access_by_id #42951

Closed
opened 2026-04-25 14:42:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23698
Author: @Ricardo-M-L
Created: 4/14/2026
Status: Closed

Base: mainHead: fix/notes-missing-db-param


📝 Commits (1)

  • 19d5ad0 fix: add missing db parameter to filter_allowed_access_grants in update_note_access_by_id

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 backend/open_webui/routers/notes.py (+1 -0)

📄 Description

Description

In update_note_access_by_id(), the call to filter_allowed_access_grants() at line 345 is missing the db=db parameter. The same function is called correctly with db=db in update_note_by_id() at line 281.

filter_allowed_access_grants() accepts db: Session | None = None and uses it for database operations when filtering access grants. Without it, the function may fail to properly validate group-based access grants that require database lookups.

Changes

Add the missing db=db parameter to the filter_allowed_access_grants() call in update_note_access_by_id(), matching the pattern already used in update_note_by_id().


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/23698 **Author:** [@Ricardo-M-L](https://github.com/Ricardo-M-L) **Created:** 4/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/notes-missing-db-param` --- ### 📝 Commits (1) - [`19d5ad0`](https://github.com/open-webui/open-webui/commit/19d5ad0b58cd2c585bf1a4c468cd09e179f5a5d2) fix: add missing db parameter to filter_allowed_access_grants in update_note_access_by_id ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/notes.py` (+1 -0) </details> ### 📄 Description ## Description In `update_note_access_by_id()`, the call to `filter_allowed_access_grants()` at line 345 is missing the `db=db` parameter. The same function is called correctly with `db=db` in `update_note_by_id()` at line 281. `filter_allowed_access_grants()` accepts `db: Session | None = None` and uses it for database operations when filtering access grants. Without it, the function may fail to properly validate group-based access grants that require database lookups. ## Changes Add the missing `db=db` parameter to the `filter_allowed_access_grants()` call in `update_note_access_by_id()`, matching the pattern already used in `update_note_by_id()`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 14:42:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#42951