diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-06-02 20:48:40 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-06-02 20:48:40 +0000 |
commit | 7cc734a2176e199d2e28ad8666e7e4e0030682db (patch) | |
tree | 8c5699cc243e3f4fd1448fb0e1f00020e100cfde /lib | |
parent | 256a8601fb3e762193973afff25152dcdab9930c (diff) | |
parent | c890c6aaf2939bc19292947bd8268d724fa7ddce (diff) | |
download | gitlab-ce-7cc734a2176e199d2e28ad8666e7e4e0030682db.tar.gz |
Merge branch '28694-hard-delete-user-from-api' into 'master'
Allow users to be hard-deleted from the API
See merge request !11853
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/users.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 3d83720b7b9..2070dbd8bc7 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -286,13 +286,14 @@ module API end params do requires :id, type: Integer, desc: 'The ID of the user' + optional :hard_delete, type: Boolean, desc: "Whether to remove a user's contributions" end delete ":id" do authenticated_as_admin! user = User.find_by(id: params[:id]) not_found!('User') unless user - DeleteUserWorker.perform_async(current_user.id, user.id) + DeleteUserWorker.perform_async(current_user.id, user.id, hard_delete: params[:hard_delete]) end desc 'Block a user. Available only for admins.' |