diff --git a/app/assets/javascripts/discourse/models/post.js b/app/assets/javascripts/discourse/models/post.js index 0fe6af36974..d6801a18e3d 100644 --- a/app/assets/javascripts/discourse/models/post.js +++ b/app/assets/javascripts/discourse/models/post.js @@ -343,7 +343,11 @@ Discourse.Post = Discourse.Model.extend({ topic = this.get('topic'); return !topic.isReplyDirectlyBelow(this); - }.property('reply_count') + }.property('reply_count'), + + canViewEditHistory: function() { + return (Discourse.SiteSettings.edit_history_visible_to_public || (Discourse.User.current() && Discourse.User.current().get('staff'))); + }.property() }); diff --git a/app/assets/javascripts/discourse/templates/post.js.handlebars b/app/assets/javascripts/discourse/templates/post.js.handlebars index efb2f3a08ca..23924a53517 100644 --- a/app/assets/javascripts/discourse/templates/post.js.handlebars +++ b/app/assets/javascripts/discourse/templates/post.js.handlebars @@ -32,10 +32,17 @@