From f390c9257874452e2a7e2aa918502a713d7ea4e2 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 17 Mar 2014 10:59:15 -0400 Subject: [PATCH] Hide the Invite button in topics in secured categories --- .../javascripts/discourse/views/topic_footer_buttons_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/views/topic_footer_buttons_view.js b/app/assets/javascripts/discourse/views/topic_footer_buttons_view.js index 082d99900f9..63c838718c4 100644 --- a/app/assets/javascripts/discourse/views/topic_footer_buttons_view.js +++ b/app/assets/javascripts/discourse/views/topic_footer_buttons_view.js @@ -21,7 +21,7 @@ Discourse.TopicFooterButtonsView = Discourse.ContainerView.extend({ if (Discourse.User.current()) { if (!topic.get('isPrivateMessage')) { // We hide some controls from private messages - if (this.get('topic.details.can_invite_to')) { + if (this.get('topic.details.can_invite_to') && !this.get('topic.category.read_restricted')) { this.attachViewClass(Discourse.InviteReplyButton); } this.attachViewClass(Discourse.StarButton);