mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API backwards compatibility. Co-Authored-By: romanrizzi <romanalejandro@gmail.com> Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
This commit is contained in:
@ -573,36 +573,6 @@ const AdminUser = Discourse.User.extend({
|
||||
});
|
||||
|
||||
AdminUser.reopenClass({
|
||||
bulkApprove(users) {
|
||||
users.forEach(user => {
|
||||
user.setProperties({
|
||||
approved: true,
|
||||
can_approve: false,
|
||||
selected: false
|
||||
});
|
||||
});
|
||||
|
||||
return ajax("/admin/users/approve-bulk", {
|
||||
type: "PUT",
|
||||
data: { users: users.map(u => u.id) }
|
||||
}).finally(() => bootbox.alert(I18n.t("admin.user.approve_bulk_success")));
|
||||
},
|
||||
|
||||
bulkReject(users) {
|
||||
users.forEach(user => {
|
||||
user.set("can_approve", false);
|
||||
user.set("selected", false);
|
||||
});
|
||||
|
||||
return ajax("/admin/users/reject-bulk", {
|
||||
type: "DELETE",
|
||||
data: {
|
||||
users: users.map(u => u.id),
|
||||
context: window.location.pathname
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
find(user_id) {
|
||||
return ajax("/admin/users/" + user_id + ".json").then(result => {
|
||||
result.loadedDetails = true;
|
||||
|
Reference in New Issue
Block a user