mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 12:44:34 +08:00
Add reject option to pending users page
This commit is contained in:
@ -343,6 +343,21 @@ Discourse.AdminUser.reopenClass({
|
||||
});
|
||||
},
|
||||
|
||||
bulkReject: function(users) {
|
||||
_.each(users, function(user){
|
||||
user.set('can_approve', false);
|
||||
user.set('selected', false);
|
||||
});
|
||||
|
||||
return Discourse.ajax("/admin/users/reject-bulk", {
|
||||
type: 'DELETE',
|
||||
data: {
|
||||
users: users.map(function(u) { return u.id; }),
|
||||
context: window.location.pathname
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
find: function(username) {
|
||||
return Discourse.ajax("/admin/users/" + username).then(function (result) {
|
||||
result.loadedDetails = true;
|
||||
|
Reference in New Issue
Block a user