mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 01:57:15 +08:00
Automatically flag someone as a spammer if their posts get at least X spam flags from N users while their trust level is 'new user'. Staff can clear and set this status from the user record in admin.
This commit is contained in:
@ -150,6 +150,28 @@ Discourse.AdminUser = Discourse.User.extend({
|
||||
});
|
||||
},
|
||||
|
||||
unblock: function() {
|
||||
Discourse.ajax('/admin/users/' + this.id + '/unblock', {type: 'PUT'}).then(function() {
|
||||
// succeeded
|
||||
window.location.reload();
|
||||
}, function(e) {
|
||||
// failed
|
||||
var error = Em.String.i18n('admin.user.unblock_failed', { error: "http: " + e.status + " - " + e.body });
|
||||
bootbox.alert(error);
|
||||
});
|
||||
},
|
||||
|
||||
block: function() {
|
||||
Discourse.ajax('/admin/users/' + this.id + '/block', {type: 'PUT'}).then(function() {
|
||||
// succeeded
|
||||
window.location.reload();
|
||||
}, function(e) {
|
||||
// failed
|
||||
var error = Em.String.i18n('admin.user.block_failed', { error: "http: " + e.status + " - " + e.body });
|
||||
bootbox.alert(error);
|
||||
});
|
||||
},
|
||||
|
||||
sendActivationEmail: function() {
|
||||
Discourse.ajax('/users/' + this.get('username') + '/send_activation_email').then(function() {
|
||||
// succeeded
|
||||
|
Reference in New Issue
Block a user