diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-06-15 08:45:02 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-06-15 08:45:02 -0400 |
commit | d390ec9bf2a04fac9ebdd23e6b275153a2a2e900 (patch) | |
tree | 017f1716d2e32fae0f91a8fdbf855b1d043e164b /api/post.go | |
parent | b7a821c3410ecd165241e2dbcf2c8376ae402124 (diff) | |
download | chat-d390ec9bf2a04fac9ebdd23e6b275153a2a2e900.tar.gz chat-d390ec9bf2a04fac9ebdd23e6b275153a2a2e900.tar.bz2 chat-d390ec9bf2a04fac9ebdd23e6b275153a2a2e900.zip |
fixes mm-1239 adds config setting to turn off valet feature
Diffstat (limited to 'api/post.go')
-rw-r--r-- | api/post.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/api/post.go b/api/post.go index 25a68304d..0d0f2c4cf 100644 --- a/api/post.go +++ b/api/post.go @@ -58,6 +58,11 @@ func createPost(c *Context, w http.ResponseWriter, r *http.Request) { } func createValetPost(c *Context, w http.ResponseWriter, r *http.Request) { + if !utils.Cfg.TeamSettings.AllowValet { + c.Err = model.NewAppError("createValetPost", "The valet feature is currently turned off. Please contact your system administrator for details.", "") + c.Err.StatusCode = http.StatusNotImplemented + } + post := model.PostFromJson(r.Body) if post == nil { c.SetInvalidParam("createValetPost", "post") |