summaryrefslogtreecommitdiffstats
path: root/api/command.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-06-15 10:01:37 -0800
committerCorey Hulen <corey@hulen.com>2015-06-15 10:01:37 -0800
commit61eac918b74494b085ff1863a027aa79437ed1ac (patch)
treeedda731dd6d589abe98e025b437952d37d83eeaa /api/command.go
parentc068d40c172af90fad36780b1186d72d593cbfa8 (diff)
parente774a67e33a8178c6c11e46f95da5cda28303c33 (diff)
downloadchat-61eac918b74494b085ff1863a027aa79437ed1ac.tar.gz
chat-61eac918b74494b085ff1863a027aa79437ed1ac.tar.bz2
chat-61eac918b74494b085ff1863a027aa79437ed1ac.zip
Merge pull request #2 from mattermost/mm-1239
fixes mm-1239 adds config setting to turn off valet feature
Diffstat (limited to 'api/command.go')
-rw-r--r--api/command.go6
1 files changed, 5 insertions, 1 deletions
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()
}