mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 05:02:58 +03:00
[PR #471] [MERGED] fix: prevent deadlock when trying to delete LDAP users #786
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/471
Author: @ItalyPaleAle
Created: 4/22/2025
Status: ✅ Merged
Merged: 4/22/2025
Merged by: @stonith404
Base:
main← Head:fixes-20240421📝 Commits (1)
ad595b9fix: prevent deadlock when trying to delete LDAP users📊 Changes
2 files changed (+18 additions, -32 deletions)
View changed files
📝
backend/internal/service/ldap_service.go(+12 -7)📝
backend/internal/service/user_service.go(+6 -25)📄 Description
Fixup from #437
Reverted LDAP to use
deleteUserInternalwhich accepts an existing transaction. Without that, it would cause a deadlock in SQLite, as we can't start a transaction if there's another one active alreadyAlso renamed
DisableUsertodisableUserInternalsince it's another "internal" method🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.