From d390ec9bf2a04fac9ebdd23e6b275153a2a2e900 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Mon, 15 Jun 2015 08:45:02 -0400 Subject: fixes mm-1239 adds config setting to turn off valet feature --- api/command.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'api/command.go') diff --git a/api/command.go b/api/command.go index 9efc79b49..449483bbf 100644 --- a/api/command.go +++ b/api/command.go @@ -19,12 +19,16 @@ var commands = []commandHandler{ logoutCommand, joinCommand, loadTestCommand, - echoCommand, } func InitCommand(r *mux.Router) { l4g.Debug("Initializing command api routes") r.Handle("/command", ApiUserRequired(command)).Methods("POST") + + if utils.Cfg.TeamSettings.AllowValet { + commands = append(commands, echoCommand) + } + hub.Start() } -- cgit v1.2.3-1-g7c22