FIX: If private messages are disabled don't show the menu link
This commit is contained in:
parent
0a22fe3db0
commit
d3666d3468
|
@ -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() {
|
||||
|
|
|
@ -8,7 +8,10 @@
|
|||
{{/if}}
|
||||
<li class='glyphs'>
|
||||
{{d-link path=bookmarksPath title="user.bookmarks" icon="bookmark"}}
|
||||
{{log siteSettings}}
|
||||
{{#if siteSettings.enable_private_messages}}
|
||||
{{d-link path=messagesPath title="user.private_messages" icon="envelope"}}
|
||||
{{/if}}
|
||||
{{#if showEnableAnon}}
|
||||
{{d-link action="toggleAnon" title="switch_to_anon" icon="user-secret"}}
|
||||
{{/if}}
|
||||
|
|
|
@ -374,7 +374,9 @@ posting:
|
|||
min_body_similar_length:
|
||||
client: true
|
||||
default: 15
|
||||
enable_private_messages: true
|
||||
enable_private_messages:
|
||||
default: true
|
||||
client: true
|
||||
ninja_edit_window: 300
|
||||
post_edit_time_limit: 86400
|
||||
edit_history_visible_to_public:
|
||||
|
|
Loading…
Reference in New Issue