mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
refac
This commit is contained in:
parent
dfdf94483b
commit
8bc7d85eac
1 changed files with 3 additions and 1 deletions
|
|
@ -509,7 +509,9 @@ def get_sources_from_items(
|
||||||
note = Notes.get_note_by_id(item.get("id"))
|
note = Notes.get_note_by_id(item.get("id"))
|
||||||
|
|
||||||
if note and (
|
if note and (
|
||||||
user.role == "admin" or has_access(user.id, "read", note.access_control)
|
user.role == "admin"
|
||||||
|
or note.user_id == user.id
|
||||||
|
or has_access(user.id, "read", note.access_control)
|
||||||
):
|
):
|
||||||
# User has access to the note
|
# User has access to the note
|
||||||
query_result = {
|
query_result = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue