fix(webui): display user accounts menu entry to admin even on error pages
This commit is contained in:
parent
7a3bf725b0
commit
7abe963bfd
10 changed files with 33 additions and 33 deletions
|
@ -19,7 +19,7 @@ func adminMiddleware(db *database.DB, requireLogin func(http.Handler) http.Handl
|
|||
return
|
||||
}
|
||||
if !account.(*model.Account).IsAdmin {
|
||||
errorResponse(w, http.StatusForbidden, fmt.Errorf("Only administrators can perform this request."))
|
||||
errorResponse(w, r, http.StatusForbidden, fmt.Errorf("Only administrators can perform this request."))
|
||||
return
|
||||
}
|
||||
next.ServeHTTP(w, r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue