mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
upload, implicit hosting, only members that can control.
This commit is contained in:
parent
d65ba62bfc
commit
fad6b649d3
@ -72,7 +72,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() && !h.sessions.ImplicitHosting() {
|
||||
if !session.IsHost() && (!session.CanHost() || !h.sessions.ImplicitHosting()) {
|
||||
utils.HttpForbidden(w, "Without implicit hosting, only host can upload files.")
|
||||
} else {
|
||||
next.ServeHTTP(w, r)
|
||||
|
Loading…
Reference in New Issue
Block a user