mirror of
https://github.com/flarum/framework.git
synced 2025-03-26 00:35:16 +08:00
Don't show the reply button if the user can't reply
This commit is contained in:
parent
578d8df04d
commit
0e774db5a0
@ -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()+' ';
|
||||
|
Loading…
x
Reference in New Issue
Block a user