mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-05 20:32:50 +02:00
add locked controls to settings.
This commit is contained in:
parent
b8fccc4d07
commit
cf4e0666fe
4 changed files with 19 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue