mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 10:54:50 +08:00
FEATURE: Add an option to block IPs and emails to bulk user delete (#29993)
This commit adds an option for blocking the IP and email addresses when bulk-deleting users. Internal topic: t/140321/11.
This commit is contained in:
@ -403,8 +403,12 @@ class Admin::UsersController < Admin::StaffController
|
||||
end
|
||||
|
||||
def destroy_bulk
|
||||
# capture service_params outside the hijack block to avoid thread safety
|
||||
# issues
|
||||
service_arg = service_params
|
||||
|
||||
hijack do
|
||||
User::BulkDestroy.call(service_params) do
|
||||
User::BulkDestroy.call(service_arg) do
|
||||
on_success { render json: { deleted: true } }
|
||||
|
||||
on_failed_contract do |contract|
|
||||
|
Reference in New Issue
Block a user