Don't show the reply button if the user can't reply

This commit is contained in:
Toby Zerner 2015-06-16 17:34:47 +09:30
parent 578d8df04d
commit 0e774db5a0

View File

@ -5,7 +5,7 @@ import CommentPost from 'flarum/components/comment-post';
export default function() {
extend(CommentPost.prototype, 'actionItems', function(items) {
var post = this.props.post;
if (post.isHidden()) return;
if (post.isHidden() || (app.session.user() && !post.discussion().canReply())) return;
function insertMention(component, quote) {
var mention = '@'+post.user().username()+'#'+post.number()+' ';