gitlabhq/lib/api
Felix Gilcher ce6436b98a Don't crash when removing a user that's not project member
The attempt to revoke project access for a user that was not member of the
project results in a 500 Internal Server error where it actually should
result in a 200 OK since after the operation, the user is not member of
the project. This turns the operation into an idempotent call that can
be repeated with no ill effects.

Updated the spec and changed the code accordingly. However, the result differs
slightly, as we can't return the users project access level if the user was not
member. I'm not aware if anybody relies on the result of this call.

Fixes #2832
2013-02-01 13:53:35 +00:00
..
entities.rb 'namespace' should be exposed via the API 2013-01-02 21:31:20 +01:00
helpers.rb Fix namespace api autocomplete 2012-12-12 12:54:28 +02:00
issues.rb Fixed missing current user for issue observer 2013-01-02 20:25:25 +02:00
merge_requests.rb Remove all references tp the project code parameter from the API 2012-12-21 18:47:04 +01:00
milestones.rb Remove all references tp the project code parameter from the API 2012-12-21 18:47:04 +01:00
notes.rb Rspec fixes 2013-01-04 18:50:31 +02:00
projects.rb Don't crash when removing a user that's not project member 2013-02-01 13:53:35 +00:00
session.rb API: return 401 for invalid session 2012-09-20 08:38:08 -07:00
users.rb Validates presence of User#name 2012-12-12 17:53:43 +01:00