Hide the Invite button in topics in secured categories

This commit is contained in:
Neil Lalonde 2014-03-17 10:59:15 -04:00
parent 26578d1b73
commit f390c92578
1 changed files with 1 additions and 1 deletions

View File

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