mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
🐛 Bug Report: Admin can delete their own account, resulting in a lockout if they are the only admin. #94
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?
Originally created by @zeedif on GitHub.
Originally assigned to: @kmendell on GitHub.
Reproduction steps
/settings/admin/users).Expected behavior
The application should prevent the deletion of the last (and only) administrator account. At a minimum, it should display a strong, explicit warning highlighting that this action will result in a complete lockout from the application, requiring manual database intervention to recover.
Actual Behavior
The application allows the deletion to proceed without any special warnings. The user is immediately logged out. Upon trying to log back in, no passkeys are found. The
/setupendpoint correctly reports that setup is already complete, leaving the user completely locked out with no UI-based recovery path.Version and Environment
Log Output
No response
@kmendell commented on GitHub:
This should be fixed for the UI side of things here:
f0c144c51c, An admin will now not be able to delete or disable their own account via the UI.This will be available in the next release.