Settings: All connections, Posting accounts and Activity open on the local edition

Their admin check wanted someone signed in, so the local owner got a 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 15:29:37 -07:00
co-authored by Claude Opus 5.5
parent 1bad4deed6
commit df4759afb5
5 changed files with 28 additions and 4 deletions
+14
View File
@@ -65,3 +65,17 @@ func TestServiceOf(t *testing.T) {
}
}
}
// The local edition has no one signed in: its owner still opens the admin
// pages that don't need an account.
func TestAdminPagesLocal(t *testing.T) {
_, h := newTestServer(t, nil)
for _, p := range []string{"/settings/connections", "/settings/posting", "/settings/activity"} {
if rec := do(h, http.MethodGet, p, nil, nil); rec.Code != http.StatusOK {
t.Errorf("%s: %d, want 200", p, rec.Code)
}
}
if rec := postForm(h, "/settings/posting", url.Values{}); rec.Code != http.StatusSeeOther {
t.Errorf("saving posting accounts: %d, want 303", rec.Code)
}
}