tailcfg,all: add and use Node.IsTagged()

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2023-03-12 23:52:17 -07:00
committed by Maisem Ali
parent 83fa17d26c
commit 223713d4a1
4 changed files with 8 additions and 3 deletions

View File

@@ -147,7 +147,7 @@ func getTailscaleUser(ctx context.Context, localClient *tailscale.LocalClient, i
if err != nil {
return nil, fmt.Errorf("failed to identify remote host: %w", err)
}
if len(whois.Node.Tags) != 0 {
if whois.Node.IsTagged() {
return nil, fmt.Errorf("tagged nodes are not users")
}
if whois.UserProfile == nil || whois.UserProfile.LoginName == "" {