feat: deleting an account removes the access grants that name it (#34223)

This commit is contained in:
G30 authored and GitHub committed 2026-11-13 19:03:00 +09:00
1 parent c0b90785ea
commit 44d2dd3d52
1 file changed
+3
+3
View File
@@ -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