diff options
author | Amit Yadav <iit.amit@gmail.com> | 2017-01-18 18:38:31 +0530 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-01-18 08:08:31 -0500 |
commit | 99cf08ac38bdee25d07f27a3d9bb5d74199d106c (patch) | |
tree | e85ca087c2ec1b6bfe859d509b0f9e5c1a991630 /webapp/components/edit_post_modal.jsx | |
parent | 8f0175e15c4d6bd08ca6795851455468811c3dc9 (diff) | |
download | chat-99cf08ac38bdee25d07f27a3d9bb5d74199d106c.tar.gz chat-99cf08ac38bdee25d07f27a3d9bb5d74199d106c.tar.bz2 chat-99cf08ac38bdee25d07f27a3d9bb5d74199d106c.zip |
Message Editing and Deleting permissions (#4692)
Diffstat (limited to 'webapp/components/edit_post_modal.jsx')
-rw-r--r-- | webapp/components/edit_post_modal.jsx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/webapp/components/edit_post_modal.jsx b/webapp/components/edit_post_modal.jsx index 55bf5fe60..7c1747ef7 100644 --- a/webapp/components/edit_post_modal.jsx +++ b/webapp/components/edit_post_modal.jsx @@ -118,6 +118,17 @@ export default class EditPostModal extends React.Component { } handleEditPostEvent(options) { + var post = PostStore.getPost(options.channelId, options.postId); + if (global.window.mm_license.IsLicensed === 'true') { + if (global.window.mm_config.AllowEditPost === Constants.ALLOW_EDIT_POST_NEVER) { + return; + } + if (global.window.mm_config.AllowEditPost === Constants.ALLOW_EDIT_POST_TIME_LIMIT) { + if ((post.create_at + (global.window.mm_config.PostEditTimeLimit * 1000)) < Utils.getTimestamp()) { + return; + } + } + } this.setState({ editText: options.message || '', originalText: options.message || '', |