Merge pull request #4571 from cpradio/hide-about-me-suspended

FEATURE: Hide Profile Text from non-staff if user is suspended
This commit is contained in:
Régis Hanol 2016-11-28 10:08:57 +01:00 committed by GitHub
commit ecebc58780
2 changed files with 8 additions and 1 deletions

View File

@ -25,6 +25,11 @@ export default Ember.Controller.extend(CanCheckEmails, {
return (!indexStream || viewingSelf) && !forceExpand;
},
@computed('model.isSuspended', 'currentUser.staff')
isNotSuspendedOrIsStaff(isSuspended, isStaff) {
return !isSuspended || isStaff;
},
linkWebsite: Em.computed.not('model.isBasic'),
@computed("model.trust_level")

View File

@ -86,7 +86,9 @@
<b>{{i18n 'user.suspended_reason'}}</b> {{model.suspend_reason}}
</div>
{{/if}}
{{{model.bio_cooked}}}
{{#if isNotSuspendedOrIsStaff}}
{{{model.bio_cooked}}}
{{/if}}
</div>
{{#if publicUserFields}}