mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:52:50 +08:00
FIX: suspended users still appear suspended after their suspension expires
This commit is contained in:
parent
c4394688de
commit
915861a646
|
@ -99,6 +99,10 @@ Discourse.User = Discourse.Model.extend({
|
|||
|
||||
isSuspended: Em.computed.equal('suspended', true),
|
||||
|
||||
suspended: function() {
|
||||
return this.get('suspended_till') && moment(this.get('suspended_till')).isAfter();
|
||||
}.property('suspended_till'),
|
||||
|
||||
suspendedTillDate: function() {
|
||||
return Discourse.Formatter.longDate(this.get('suspended_till'));
|
||||
}.property('suspended_till'),
|
||||
|
|
|
@ -18,7 +18,6 @@ class UserSerializer < BasicUserSerializer
|
|||
:moderator,
|
||||
:admin,
|
||||
:title,
|
||||
:suspended,
|
||||
:suspend_reason,
|
||||
:suspended_till
|
||||
|
||||
|
@ -99,10 +98,6 @@ class UserSerializer < BasicUserSerializer
|
|||
SiteSetting.enable_names?
|
||||
end
|
||||
|
||||
def suspended
|
||||
object.suspended?
|
||||
end
|
||||
|
||||
def include_suspended?
|
||||
object.suspended?
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user