mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-22 21:50:42 -05:00
feat: deleting an account removes the access grants that name it (#34223)
This commit is contained in:
1 file changed
+3
@@ -863,6 +863,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.access_grants import AccessGrant
|
||||
|
||||
await session.execute(delete(AccessGrant).filter_by(principal_type='user', principal_id=id))
|
||||
await session.execute(delete(User).where(User.id == id))
|
||||
await session.commit()
|
||||
return True
|
||||
|
||||
Reference in new issue
Block a user