mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add locked controls to settings.
This commit is contained in:
@ -39,6 +39,10 @@ func (h *RoomHandler) controlRequest(w http.ResponseWriter, r *http.Request) err
|
||||
}
|
||||
|
||||
session, _ := auth.GetSession(r)
|
||||
if h.sessions.Settings().LockedControls && !session.Profile().IsAdmin {
|
||||
return utils.HttpForbidden("controls are locked")
|
||||
}
|
||||
|
||||
h.sessions.SetHost(session)
|
||||
|
||||
return utils.HttpSuccess(w)
|
||||
|
Reference in New Issue
Block a user