diff --git a/group/group.go b/group/group.go index c5fec13..5e426d5 100644 --- a/group/group.go +++ b/group/group.go @@ -1185,8 +1185,9 @@ func (g *Group) GetPermission(creds ClientCredentials) (string, []string, error) type Status struct { Name string `json:"name"` - Location string `json:"location"` - Endpoint string `json:"endpoint"` + Redirect string `json:"redirect,omitempty"` + Location string `json:"location,omitempty"` + Endpoint string `json:"endpoint,omitempty"` DisplayName string `json:"displayName,omitempty"` Description string `json:"description,omitempty"` AuthServer string `json:"authServer,omitempty"` @@ -1201,6 +1202,15 @@ type Status struct { func (g *Group) Status(authentified bool, base string) Status { desc := g.Description() + if desc.Redirect != "" { + return Status{ + Name: g.name, + Redirect: desc.Redirect, + DisplayName: desc.DisplayName, + Description: desc.Description, + } + } + var location, endpoint string if base != "" { burl, err := url.Parse(base) diff --git a/static/mainpage.js b/static/mainpage.js index 6fda1e7..8488377 100644 --- a/static/mainpage.js +++ b/static/mainpage.js @@ -119,8 +119,12 @@ async function listPublicGroups() { td2.textContent = group.description; tr.appendChild(td2); let td3 = document.createElement('td'); - let locked = group.locked ? ', locked' : ''; - td3.textContent = `(${group.clientCount} clients${locked})`; + if(!group.redirect) { + let locked = group.locked ? ', locked' : ''; + td3.textContent = `(${group.clientCount} clients${locked})`; + } else { + td3.textContent = '(remote)'; + } tr.appendChild(td3); table.appendChild(tr); }