mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: If private messages are disabled don't show the menu link
This commit is contained in:
parent
0a22fe3db0
commit
d3666d3468
3 changed files with 12 additions and 3 deletions
|
@ -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"}}
|
||||
{{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}}
|
||||
{{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 a new issue