api/v2: add user get and list (Tailscale compat)

Backs the tailscale_user and tailscale_users data sources. getUser maps
gorm/ErrUserNotFound to 404; unmodelled fields are honest constants,
deviceCount/lastSeen/currentlyConnected aggregate the user's nodes.
This commit is contained in:
Kristoffer Dalby committed 2026-06-24 18:41:06 +02:00
1 parent ec0cb6f63a
commit 475a5ead0c
3 files changed
+179

No files matched your search

+3
View File
@@ -244,6 +244,9 @@ const (
ScopeFeatureSettings Scope = "feature_settings"
ScopeFeatureSettingsRead Scope = "feature_settings:read"
ScopeUsers Scope = "users"
ScopeUsersRead Scope = "users:read"
)
// scopeMetaKey keys the per-operation required Scope in huma.Operation.Metadata.