diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index 5b26e389ebf..d30dfee5733 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -70,6 +70,15 @@ export default Ember.Controller.extend(BufferedContent, { } }, + @computed("model.details.can_create_post") + embedQuoteButton(canCreatePost) { + return ( + canCreatePost && + this.currentUser && + this.currentUser.get("enable_quoting") + ); + }, + @computed("model.postStream.loaded", "model.category_id") showSharedDraftControls(loaded, categoryId) { let draftCat = this.site.shared_drafts_category_id; diff --git a/app/assets/javascripts/discourse/templates/topic.hbs b/app/assets/javascripts/discourse/templates/topic.hbs index 40e3db1c69a..400a7efb4de 100644 --- a/app/assets/javascripts/discourse/templates/topic.hbs +++ b/app/assets/javascripts/discourse/templates/topic.hbs @@ -322,7 +322,7 @@ {{share-popup topic=model replyAsNewTopic="replyAsNewTopic"}} - {{#if currentUser.enable_quoting}} + {{#if embedQuoteButton}} {{quote-button quoteState=quoteState selectText=(action "selectText")}} {{/if}} {{/discourse-topic}}