mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-05 11:07:55 -05:00
fix: deleting an account leaves its saved folder layouts behind (#35558)
When an admin deleted an account, the tab and pane layouts that person had saved in folders stayed stored, while their chat layouts were removed. Deleting an account now also removes its folder layouts. Other people's layouts are not touched. Fixes #35555
This commit is contained in:
1 parent
ae1a952ee4
commit
0d3f6b6ced
1 file changed
+3
@@ -890,6 +890,9 @@ class UsersTable:
|
||||
from open_webui.models.chat_views import ChatViewState
|
||||
|
||||
await session.execute(delete(ChatViewState).where(ChatViewState.user_id == id))
|
||||
from open_webui.models.folder_views import FolderViewState
|
||||
|
||||
await session.execute(delete(FolderViewState).where(FolderViewState.user_id == id))
|
||||
from open_webui.models.access_grants import AccessGrant
|
||||
|
||||
await session.execute(delete(AccessGrant).filter_by(principal_type='user', principal_id=id))
|
||||
|
||||
Reference in new issue
Block a user