Message Editing and Deleting permissions (#4692)

Этот коммит содержится в:
Amit Yadav
2017-01-18 18:38:31 +05:30
коммит произвёл Joram Wilander
родитель 8f0175e15c
Коммит 99cf08ac38
20 изменённых файлов: 575 добавлений и 32 удалений

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

@@ -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 || '',