diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-17 12:27:03 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-17 12:27:03 -0400 |
commit | 0fe75cb7826944a3352705d5e78eba1d12cc213a (patch) | |
tree | e7391d4540f42c9dea23631217b8823db43d632e /api/post.go | |
parent | 5580c28e54015b78893c33cc3bf41da75712c4cb (diff) | |
download | chat-0fe75cb7826944a3352705d5e78eba1d12cc213a.tar.gz chat-0fe75cb7826944a3352705d5e78eba1d12cc213a.tar.bz2 chat-0fe75cb7826944a3352705d5e78eba1d12cc213a.zip |
PLT-1909 Removed the ability to edit system posts (#3013)
* Removed the ability to edit system posts
* Added increased timeout to SpinnerButton unit tests
Diffstat (limited to 'api/post.go')
-rw-r--r-- | api/post.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/api/post.go b/api/post.go index 734cb7148..6be3ec7eb 100644 --- a/api/post.go +++ b/api/post.go @@ -919,6 +919,12 @@ func updatePost(c *Context, w http.ResponseWriter, r *http.Request) { c.Err.StatusCode = http.StatusForbidden return } + + if oldPost.IsSystemMessage() { + c.Err = model.NewLocAppError("updatePost", "api.post.update_post.system_message.app_error", nil, "id="+post.Id) + c.Err.StatusCode = http.StatusForbidden + return + } } hashtags, _ := model.ParseHashtags(post.Message) |