mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
allow staff to delete user if posts are 5 or less irrespective of delete_user_max_post_age
This commit is contained in:
@ -67,9 +67,17 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
||||
silence() { return this.get("model").silence(); },
|
||||
deleteAllPosts() { return this.get("model").deleteAllPosts(); },
|
||||
anonymize() { return this.get('model').anonymize(); },
|
||||
destroy() { return this.get('model').destroy(); },
|
||||
disableSecondFactor() { return this.get('model').disableSecondFactor(); },
|
||||
|
||||
destroy() {
|
||||
const postCount = this.get('model.post_count');
|
||||
if (postCount <= 5) {
|
||||
return this.get('model').destroy({ deletePosts: true });
|
||||
} else {
|
||||
return this.get('model').destroy();
|
||||
}
|
||||
},
|
||||
|
||||
viewActionLogs() {
|
||||
this.get('adminTools').showActionLogs(this, {
|
||||
target_user: this.get('model.username'),
|
||||
|
Reference in New Issue
Block a user