@@ -367,7 +367,7 @@
{{i18n 'admin.user.silenced'}}
{{i18n-yes-no model.silenced}}
- {{#if model.isSilenced}}
+ {{#if model.silenced}}
{{#unless model.silencedForever}}
{{i18n "admin.user.suspended_until" until=model.silencedTillDate}}
{{/unless}}
@@ -394,7 +394,7 @@
{{i18n 'admin.user.silenced_by'}}
@@ -408,6 +408,7 @@
{{/if}}
+
{{#if currentUser.admin}}
diff --git a/app/assets/javascripts/discourse/components/user-card-contents.js.es6 b/app/assets/javascripts/discourse/components/user-card-contents.js.es6
index 140b69a1b57..d75bab921a0 100644
--- a/app/assets/javascripts/discourse/components/user-card-contents.js.es6
+++ b/app/assets/javascripts/discourse/components/user-card-contents.js.es6
@@ -18,7 +18,6 @@ export default Ember.Component.extend(CardContentsBase, CanCheckEmails, CleansUp
showFilter: Ember.computed.and('viewingTopic', 'postStream.hasNoFilters', 'enoughPostsForFiltering'),
showName: propertyNotEqual('user.name', 'user.username'),
hasUserFilters: Ember.computed.gt('postStream.userFilters.length', 0),
- isSuspended: Ember.computed.notEmpty('user.suspend_reason'),
showMoreBadges: Ember.computed.gt('moreBadgesCount', 0),
showDelete: Ember.computed.and("viewingAdmin", "showName", "user.canBeDeleted"),
linkWebsite: Ember.computed.not('user.isBasic'),
diff --git a/app/assets/javascripts/discourse/controllers/user.js.es6 b/app/assets/javascripts/discourse/controllers/user.js.es6
index ecde47f23b0..afa32314131 100644
--- a/app/assets/javascripts/discourse/controllers/user.js.es6
+++ b/app/assets/javascripts/discourse/controllers/user.js.es6
@@ -39,9 +39,9 @@ export default Ember.Controller.extend(CanCheckEmails, {
showStaffCounters: Ember.computed.or('hasGivenFlags', 'hasFlaggedPosts', 'hasDeletedPosts', 'hasBeenSuspended', 'hasReceivedWarnings'),
- @computed('model.isSuspended', 'currentUser.staff')
- isNotSuspendedOrIsStaff(isSuspended, isStaff) {
- return !isSuspended || isStaff;
+ @computed('model.suspended', 'currentUser.staff')
+ isNotSuspendedOrIsStaff(suspended, isStaff) {
+ return !suspended || isStaff;
},
linkWebsite: Em.computed.not('model.isBasic'),
diff --git a/app/assets/javascripts/discourse/models/user.js.es6 b/app/assets/javascripts/discourse/models/user.js.es6
index 19e3ebcd142..a76f17be969 100644
--- a/app/assets/javascripts/discourse/models/user.js.es6
+++ b/app/assets/javascripts/discourse/models/user.js.es6
@@ -169,8 +169,6 @@ const User = RestModel.extend({
isElder: Em.computed.equal('trust_level', 4),
canManageTopic: Em.computed.or('staff', 'isElder'),
- isSuspended: Em.computed.equal('suspended', true),
-
@computed("previous_visit_at")
previousVisitAt(previous_visit_at) {
return new Date(previous_visit_at);
diff --git a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
index 66275c66345..59c1891fb1d 100644
--- a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
+++ b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
@@ -84,7 +84,7 @@
args=(hash user=user close=(action "close"))
tagName=""}}
- {{#if isSuspended}}
+ {{#if user.suspend_reason}}
{{d-icon "ban"}}
{{i18n 'user.suspended_notice' date=user.suspendedTillDate}}
diff --git a/app/assets/javascripts/discourse/templates/user.hbs b/app/assets/javascripts/discourse/templates/user.hbs
index 177a8fec056..3b3acc6fa94 100644
--- a/app/assets/javascripts/discourse/templates/user.hbs
+++ b/app/assets/javascripts/discourse/templates/user.hbs
@@ -107,7 +107,7 @@
- {{#if model.isSuspended}}
+ {{#if model.suspended}}
{{d-icon "ban"}}