fixes mm-1239 adds config setting to turn off valet feature

Этот коммит содержится в:
JoramWilander
2015-06-15 08:45:02 -04:00
родитель b7a821c341
Коммит d390ec9bf2
5 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@@ -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")