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
commit85a26987ae6b951d9022b5d8d1c9e465b72b5b8f (patch)
tree9c9f31b5b9cf9d937533d56e3a575786533faed5 /api/command.go
parent06a10ab27911d58032c2cd023fb576d221c7fb68 (diff)
parent40dcfd99d7674f3651c98a29530d425f5be30bed (diff)
downloadchat-85a26987ae6b951d9022b5d8d1c9e465b72b5b8f.tar.gz
chat-85a26987ae6b951d9022b5d8d1c9e465b72b5b8f.tar.bz2
chat-85a26987ae6b951d9022b5d8d1c9e465b72b5b8f.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()
}