gitlabhq/gitlabhq — pull request #1651 by dosire (2012-10-08 11:43:07+00:00)
Title: Do not allow removal of a project owner user.

If a user owns a project it should not be possible to delete the user. Doing so will cause the project to have no owner and lead to errors. The user should be blocked instead.

This fixes the following bug:

1. Make a user.
1. Make a project as this user (user is the owner of the project).
1. Delete the user.
1. Try to delete the project => `NoMethodError` because it the user is nil and it can't find its name.