mirror of
https://github.com/flarum/core.git
synced 2025-08-02 22:47:33 +02:00
Don't show the reply button if the user can't reply
This commit is contained in:
@@ -5,7 +5,7 @@ import CommentPost from 'flarum/components/comment-post';
|
|||||||
export default function() {
|
export default function() {
|
||||||
extend(CommentPost.prototype, 'actionItems', function(items) {
|
extend(CommentPost.prototype, 'actionItems', function(items) {
|
||||||
var post = this.props.post;
|
var post = this.props.post;
|
||||||
if (post.isHidden()) return;
|
if (post.isHidden() || (app.session.user() && !post.discussion().canReply())) return;
|
||||||
|
|
||||||
function insertMention(component, quote) {
|
function insertMention(component, quote) {
|
||||||
var mention = '@'+post.user().username()+'#'+post.number()+' ';
|
var mention = '@'+post.user().username()+'#'+post.number()+' ';
|
||||||
|
Reference in New Issue
Block a user