Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-06-05 22:22:08 +0300
committerDouwe Maan <douwe@gitlab.com>2017-06-05 22:22:08 +0300
commit7c23c6af6f185c6f1a41af4c46daf6d0fc41ee82 (patch)
tree1590d1719a597a12a9351216c879e970b46a32f5 /app/controllers
parent43dcb0afdbf1f1a80f94580301cbafc9dbd772e6 (diff)
parent2cbe716a54753757982a800d8196b0480d699504 (diff)
Merge branch '28694-hard-delete-user-from-admin-panel' into 'master'
Allow users to be hard-deleted from the admin panel Closes #28694 See merge request !11874
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/users_controller.rb2
-rw-r--r--app/controllers/registrations_controller.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 563bcc65bd6..bace99dad58 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -138,7 +138,7 @@ class Admin::UsersController < Admin::ApplicationController
end
def destroy
- DeleteUserWorker.perform_async(current_user.id, user.id)
+ user.delete_async(deleted_by: current_user, params: params.permit(:hard_delete))
respond_to do |format|
format.html { redirect_to admin_users_path, notice: "The user is being deleted." }
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 3ca14dee33c..cd2003586be 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -25,7 +25,7 @@ class RegistrationsController < Devise::RegistrationsController
end
def destroy
- DeleteUserWorker.perform_async(current_user.id, current_user.id)
+ current_user.delete_async(deleted_by: current_user)
respond_to do |format|
format.html do