diff options
| author | Marwan Sulaiman <marwan@tailscale.com> | 2023-12-01 02:39:14 -0500 |
|---|---|---|
| committer | Marwan Sulaiman <marwan@tailscale.com> | 2023-12-01 03:04:35 -0500 |
| commit | 8092eaed805ec2baac601e5a93ed4fe2fbad4a80 (patch) | |
| tree | f9217bcfa64c2e20500339fce70382a686152762 /control/controlclient | |
| parent | b819f66eb1efab85dcf5550d4f0da92fb7ab2551 (diff) | |
| download | tailscale-marwan/displayname.tar.xz tailscale-marwan/displayname.zip | |
ipn/ipnlocal,others: add tailnet display name to user profilemarwan/displayname
This PR adds the new editable display name for a tailnet which
will be the preferred display in client UIs and CLIs when
fast user switching between profiles.
Updates #9286
Signed-off-by: Marwan Sulaiman <marwan@tailscale.com>
Diffstat (limited to 'control/controlclient')
| -rw-r--r-- | control/controlclient/map.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/control/controlclient/map.go b/control/controlclient/map.go index 90bf83213..67cf8cd90 100644 --- a/control/controlclient/map.go +++ b/control/controlclient/map.go @@ -83,6 +83,7 @@ type mapSession struct { lastSSHPolicy *tailcfg.SSHPolicy collectServices bool lastDomain string + lastDisplayName string lastDomainAuditLogID string lastHealth []string lastPopBrowserURL string @@ -312,6 +313,9 @@ func (ms *mapSession) updateStateFromResponse(resp *tailcfg.MapResponse) { if resp.Domain != "" { ms.lastDomain = resp.Domain } + if resp.DisplayName != "" { + ms.lastDisplayName = resp.DisplayName + } if resp.DomainDataPlaneAuditLogID != "" { ms.lastDomainAuditLogID = resp.DomainDataPlaneAuditLogID } @@ -756,6 +760,7 @@ func (ms *mapSession) netmap() *netmap.NetworkMap { Peers: peerViews, UserProfiles: make(map[tailcfg.UserID]tailcfg.UserProfile), Domain: ms.lastDomain, + DisplayName: ms.lastDisplayName, DomainAuditLogID: ms.lastDomainAuditLogID, DNS: *ms.lastDNSConfig, PacketFilter: ms.lastParsedPacketFilter, |
