mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
Add button to delete a spammer in the flag modal
Add SiteSettings: delete_user_max_age, delete_all_posts_max. Add delete spammer button to admin flags UI Moderators can delete users too
This commit is contained in:
parent
e076158789
commit
4fd5087f91
18 changed files with 265 additions and 37 deletions
|
@ -56,6 +56,16 @@ Discourse.AdminFlagsController = Ember.ArrayController.extend({
|
|||
});
|
||||
},
|
||||
|
||||
/**
|
||||
Deletes a user and all posts and topics created by that user.
|
||||
|
||||
@method deleteSpammer
|
||||
@param {Discourse.FlaggedPost} item The post to delete
|
||||
**/
|
||||
deleteSpammer: function(item) {
|
||||
item.get('user').deleteAsSpammer(function() { window.location.reload(); });
|
||||
},
|
||||
|
||||
/**
|
||||
Are we viewing the 'old' view?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue