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;
|
return this.get('model.trust_level') > 2 && !this.siteSettings.tl3_links_no_follow;
|
||||||
}.property('model.trust_level'),
|
}.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'),
|
canSeeNotificationHistory: Em.computed.alias('canSeePrivateMessages'),
|
||||||
|
|
||||||
showBadges: function() {
|
showBadges: function() {
|
||||||
|
|
|
@ -8,7 +8,10 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<li class='glyphs'>
|
<li class='glyphs'>
|
||||||
{{d-link path=bookmarksPath title="user.bookmarks" icon="bookmark"}}
|
{{d-link path=bookmarksPath title="user.bookmarks" icon="bookmark"}}
|
||||||
{{d-link path=messagesPath title="user.private_messages" icon="envelope"}}
|
{{log siteSettings}}
|
||||||
|
{{#if siteSettings.enable_private_messages}}
|
||||||
|
{{d-link path=messagesPath title="user.private_messages" icon="envelope"}}
|
||||||
|
{{/if}}
|
||||||
{{#if showEnableAnon}}
|
{{#if showEnableAnon}}
|
||||||
{{d-link action="toggleAnon" title="switch_to_anon" icon="user-secret"}}
|
{{d-link action="toggleAnon" title="switch_to_anon" icon="user-secret"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -374,7 +374,9 @@ posting:
|
||||||
min_body_similar_length:
|
min_body_similar_length:
|
||||||
client: true
|
client: true
|
||||||
default: 15
|
default: 15
|
||||||
enable_private_messages: true
|
enable_private_messages:
|
||||||
|
default: true
|
||||||
|
client: true
|
||||||
ninja_edit_window: 300
|
ninja_edit_window: 300
|
||||||
post_edit_time_limit: 86400
|
post_edit_time_limit: 86400
|
||||||
edit_history_visible_to_public:
|
edit_history_visible_to_public:
|
||||||
|
|
Loading…
Reference in New Issue