diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-12 06:47:39 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-12 06:47:39 +0000 |
commit | 30cf916b263c187fe231acb6e622d21297092add (patch) | |
tree | b460dd5ddebdda957073fdc2c535738673faa82b /lib/api/helpers.rb | |
parent | e71805db8a3c9c138c9835c288c22e6fa7607aeb (diff) | |
parent | b0dacc8eb06615cf5d0afb1fc8d799dd64325846 (diff) | |
download | gitlab-ce-30cf916b263c187fe231acb6e622d21297092add.tar.gz |
Merge branch 'api-edit-groups' into 'master'
Edit group members via API
Fixes #1840. Implement a new API endpoint to update the access level of an existing group member. Includes new tests and updated API docs.
cc @sytse @douwe
See merge request !1504
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 8fa30460ba6..a50ee4659a3 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -238,5 +238,10 @@ module API def secret_token File.read(Rails.root.join('.gitlab_shell_secret')) end + + def handle_member_errors(errors) + error!(errors[:access_level], 422) if errors[:access_level].any? + not_found!(errors) + end end end |