cli: distinguish no match from ambiguous match when resolving users

resolveSingleUser reported every non-single result as "multiple users
match query", including zero matches. An explicit --identifier 0 was
sent to the API, which treats id=0 as no filter, so it listed every
user and failed as ambiguous. Return a not-found error for zero matches,
list the matching users when several match, and reject a non-positive
identifier before calling the API.
This commit is contained in:
Michael Lopez
2026-09-25 12:55:04 +00:00
committed by Kristoffer Dalby
parent e4b4b89448
commit 3746ad20db
3 changed files with 79 additions and 12 deletions
+1
View File
@@ -53,6 +53,7 @@ tags; any other tag is rejected, for new and re-registering nodes alike. See
- Expiring or deleting a non-existent pre-auth key now returns an error instead of silently succeeding [#3324](https://github.com/juanfont/headscale/pull/3324)
- Improve systemd service file hardening [#3341](https://github.com/juanfont/headscale/pull/3341)
- Fix `headscale users destroy`/`rename` reporting "multiple users match query" when no user matches; an ambiguous match now lists the matching users [#3476](https://github.com/juanfont/headscale/pull/3476)
- Headscale now requires Go 1.27 to build
## 0.29.4 (2026-09-23)