FIX: Don't show the Quote popup if posting is disabled

This commit is contained in:
Robin Ward 2018-11-16 10:59:52 -05:00
parent 10723ba1c2
commit e37c4a4525
2 changed files with 10 additions and 1 deletions

View File

@ -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;

View File

@ -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}}