Merge branch 'fix-delete-user-error' into 'master'
Fix error when deleting a user who has projects
### What does this MR do?
This MR fixes an error that prevented users from being deleted in the Admin page if the user had personal projects.
### Why was this MR needed?
Deleting a user who had projects would result in an error such as this:
```
Started DELETE "/admin/users/tdb1" for MYIP at 2015-06-22 20:53:02 +0100
Processing by Admin::UsersController#destroy as HTML
Parameters: {"authenticity_token"=>"[FILTERED]", "id"=>"tdb1"}
Completed 500 Internal Server Error in 30ms (ActiveRecord: 6.7ms)
NameError (undefined local variable or method `current_user' for #<DeleteUserService:0x0000000cd01d38>):
app/services/delete_user_service.rb:10:in `block in execute'
app/services/delete_user_service.rb:7:in `execute'
app/controllers/admin/users_controller.rb:89:in `destroy'
```
### What are the relevant issue numbers?
* Closes #1856
* Closes https://github.com/gitlabhq/gitlabhq/issues/9394
See merge request !868
Showing
Please
register
or
sign in
to comment