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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user