client/web: hide admin panel links for non-tailscale control servers

Updates #10261

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy
2023-11-29 15:58:56 -05:00
committed by Sonia Appasamy
parent 8af503b0c5
commit bcc9b44cb1
8 changed files with 105 additions and 40 deletions

View File

@ -561,7 +561,8 @@ type nodeData struct {
ClientVersion *tailcfg.ClientVersion
LicensesURL string
ControlAdminURL string
LicensesURL string
}
type subnetRoute struct {
@ -596,8 +597,10 @@ func (s *Server) serveGetNodeData(w http.ResponseWriter, r *http.Request) {
UnraidToken: os.Getenv("UNRAID_CSRF_TOKEN"),
RunningSSHServer: prefs.RunSSH,
URLPrefix: strings.TrimSuffix(s.pathPrefix, "/"),
ControlAdminURL: prefs.AdminPageURL(),
LicensesURL: licenses.LicensesURL(),
}
cv, err := s.lc.CheckUpdate(r.Context())
if err != nil {
s.logf("could not check for updates: %v", err)