mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-23 03:29:33 +02:00
session profile decoupled.
This commit is contained in:
parent
7d4f7694b9
commit
4a28307c1e
15 changed files with 38 additions and 79 deletions
|
@ -89,7 +89,7 @@ func (h *RoomHandler) Route(r chi.Router) {
|
|||
func (h *RoomHandler) uploadMiddleware(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
session := auth.GetSession(r)
|
||||
if !session.IsHost() && (!session.CanHost() || !h.sessions.ImplicitHosting()) {
|
||||
if !session.IsHost() && (!session.Profile().CanHost || !h.sessions.ImplicitHosting()) {
|
||||
utils.HttpForbidden(w, "Without implicit hosting, only host can upload files.")
|
||||
} else {
|
||||
next.ServeHTTP(w, r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue