Skip to content

fix: handle null user for tag-only nodes - #467

Merged
tale merged 1 commit into
tale:mainfrom
drifterza:feature/tag-node-operations
Feb 26, 2026
Merged

tale merged 1 commit into
tale:mainfrom
drifterza:feature/tag-node-operations

Conversation

@drifterza

@drifterza drifterza commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Fixes operations on tag-only nodes that failed with server error.

In Headscale 0.28+, nodes registered with tag-only preauth keys have no user association. The permission check and UI displays were accessing node.user without null checks.

Changes:

  • Made user field optional in Machine type
  • Added null guards where node.user is accessed
  • Shows 'Tag-owned' for nodes without user

Part of #432

In Headscale 0.28+, nodes can be registered with tag-only preauth keys
which have no associated user. This change updates the Machine type to
make user optional and adds null checks throughout the codebase where
node.user is accessed.

Fixes tag node operations (rename, add tags) that previously failed
with 'Unexpected Server Error' when accessing node.user.providerId
on nodes without a user association.

Refs: tale#432
@drifterza
drifterza requested a review from tale as a code owner February 24, 2026 12:34
@tale
tale merged commit 2fdbf4a into tale:main Feb 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants