summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go5
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")