fix: allow deleting the user's own account (#5820)

This commit is contained in:
Ariel Leyva
2026-03-11 14:36:05 -04:00
committed by GitHub
parent f5f8b60b33
commit f04af0cac6
4 changed files with 55 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ var (
ErrPermissionDenied = errors.New("permission denied")
ErrInvalidRequestParams = errors.New("invalid request params")
ErrSourceIsParent = errors.New("source is parent")
ErrRootUserDeletion = errors.New("user with id 1 can't be deleted")
ErrRootUserDeletion = errors.New("the sole admin can't be deleted")
ErrCurrentPasswordIncorrect = errors.New("the current password is incorrect")
)