FEATURE: Site setting to enable displaying email on user profiles for

staff users (and the user themselves.)
This commit is contained in:
Robin Ward 2014-09-23 13:01:44 -04:00
parent 7bc223ef7c
commit dc789502f9
4 changed files with 11 additions and 1 deletions

View File

@ -8,6 +8,10 @@ export default ObjectController.extend({
collapsedInfo: Em.computed.not('indexStream'), collapsedInfo: Em.computed.not('indexStream'),
showEmailOnProfile: Discourse.computed.setting('show_email_on_profile'),
showEmail: Ember.computed.and('email', 'showEmailOnProfile'),
websiteName: function() { websiteName: function() {
var website = this.get('website'); var website = this.get('website');
if (Em.isEmpty(website)) { return; } if (Em.isEmpty(website)) { return; }

View File

@ -144,6 +144,9 @@
{{#if invited_by}} {{#if invited_by}}
<dt>{{i18n user.invited_by}}</dt><dd>{{#link-to 'user' invited_by}}{{invited_by.username}}{{/link-to}}</dd> <dt>{{i18n user.invited_by}}</dt><dd>{{#link-to 'user' invited_by}}{{invited_by.username}}{{/link-to}}</dd>
{{/if}} {{/if}}
{{#if showEmail}}
<dt>{{i18n user.email.title}}</dt><dd {{bind-attr title="email"}}>{{email}}</dd>
{{/if}}
<dt>{{i18n user.trust_level}}</dt><dd>{{trustLevel.name}}</dd> <dt>{{i18n user.trust_level}}</dt><dd>{{trustLevel.name}}</dd>
</dl> </dl>
{{plugin-outlet "user-profile-secondary"}} {{plugin-outlet "user-profile-secondary"}}

View File

@ -740,6 +740,7 @@ en:
topics_per_period_in_top_summary: "Number of top topics shown in the default top topics summary." topics_per_period_in_top_summary: "Number of top topics shown in the default top topics summary."
topics_per_period_in_top_page: "Number of top topics shown on the expanded 'Show More' top topics." topics_per_period_in_top_page: "Number of top topics shown on the expanded 'Show More' top topics."
redirect_users_to_top_page: "Automatically redirect new and long absent users to the top page." redirect_users_to_top_page: "Automatically redirect new and long absent users to the top page."
show_email_on_profile: "Show a user's email on their profile (only visible to themselves and staff)"
email_token_valid_hours: "Forgot password / activate account tokens are valid for (n) hours." email_token_valid_hours: "Forgot password / activate account tokens are valid for (n) hours."
email_token_grace_period_hours: "Forgot password / activate account tokens are still valid for a grace period of (n) hours after being redeemed." email_token_grace_period_hours: "Forgot password / activate account tokens are still valid for a grace period of (n) hours after being redeemed."

View File

@ -283,7 +283,9 @@ users:
client: true client: true
default: 15 default: 15
redirect_users_to_top_page: true redirect_users_to_top_page: true
show_email_on_profile:
client: true
default: false
email_token_valid_hours: 24 email_token_valid_hours: 24
email_token_grace_period_hours: 0 email_token_grace_period_hours: 0