mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
DEV: prevents staff computed property to be overridden (#7931)
This commit is contained in:
@ -54,7 +54,16 @@ const User = RestModel.extend({
|
||||
return UserDraftsStream.create({ user: this });
|
||||
},
|
||||
|
||||
staff: Ember.computed.or("admin", "moderator"),
|
||||
staff: Ember.computed("admin", "moderator", {
|
||||
get() {
|
||||
return this.admin || this.moderator;
|
||||
},
|
||||
|
||||
// prevents staff property to be overridden
|
||||
set() {
|
||||
return this.admin || this.moderator;
|
||||
}
|
||||
}),
|
||||
|
||||
destroySession() {
|
||||
return ajax(`/session/${this.username}`, { type: "DELETE" });
|
||||
|
Reference in New Issue
Block a user