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
+10
View File
@@ -91,6 +91,16 @@ func (s *Server) admin(w http.ResponseWriter, r *http.Request) *viewer {
return v
}
// adminPage says whether the viewer may use an admin page that needs no one
// signed in, as the local edition's owner may; or answers 403.
func (s *Server) adminPage(w http.ResponseWriter, r *http.Request) bool {
if !viewerOf(r).Member.Admin() {
s.forbidden(w, r)
return false
}
return true
}
// forbidden is the answer to a request outside someone's access.
func (s *Server) forbidden(w http.ResponseWriter, r *http.Request) {
if r.Header.Get("HX-Request") != "" || !safeMethod(r.Method) {