diff --git a/app/assets/javascripts/discourse/controllers/user.js.es6 b/app/assets/javascripts/discourse/controllers/user.js.es6 index 757779abe..83c7c4ec9 100644 --- a/app/assets/javascripts/discourse/controllers/user.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user.js.es6 @@ -23,7 +23,11 @@ export default Ember.Controller.extend(CanCheckEmails, { return this.get('model.trust_level') > 2 && !this.siteSettings.tl3_links_no_follow; }.property('model.trust_level'), - canSeePrivateMessages: Ember.computed.or('viewingSelf', 'currentUser.admin'), + @computed('viewSelf', 'currentUser.admin') + canSeePrivateMessages(viewingSelf, isAdmin) { + return this.siteSettings.enable_private_messages && (viewingSelf || isAdmin); + }, + canSeeNotificationHistory: Em.computed.alias('canSeePrivateMessages'), showBadges: function() { diff --git a/app/assets/javascripts/discourse/templates/components/user-menu.hbs b/app/assets/javascripts/discourse/templates/components/user-menu.hbs index fa0b578e6..bba85df8d 100644 --- a/app/assets/javascripts/discourse/templates/components/user-menu.hbs +++ b/app/assets/javascripts/discourse/templates/components/user-menu.hbs @@ -8,7 +8,10 @@ {{/if}}