mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-02 02:12:25 +00:00
fix: keep a note's sharing when a collaborator saves it (#30175)
This commit is contained in:
parent
d16fad585d
commit
dbe538c033
2 changed files with 10 additions and 10 deletions
|
|
@ -554,14 +554,15 @@ async def update_note_by_id(
|
|||
):
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())
|
||||
|
||||
form_data.access_grants = await filter_allowed_access_grants(
|
||||
await Config.get('user.permissions'),
|
||||
user.id,
|
||||
user.role,
|
||||
form_data.access_grants,
|
||||
'sharing.public_notes',
|
||||
db=db,
|
||||
)
|
||||
if form_data.access_grants is not None:
|
||||
form_data.access_grants = await filter_allowed_access_grants(
|
||||
await Config.get('user.permissions'),
|
||||
user.id,
|
||||
user.role,
|
||||
form_data.access_grants,
|
||||
'sharing.public_notes',
|
||||
db=db,
|
||||
)
|
||||
|
||||
try:
|
||||
note = await Notes.update_note_by_id(id, form_data, db=db)
|
||||
|
|
|
|||
|
|
@ -212,8 +212,7 @@
|
|||
title: note?.title === '' ? $i18n.t('Untitled') : note.title,
|
||||
data: {
|
||||
files: files
|
||||
},
|
||||
access_grants: note?.access_grants ?? []
|
||||
}
|
||||
}).catch((e) => {
|
||||
toast.error(`${e}`);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue