From b0dacc8eb06615cf5d0afb1fc8d799dd64325846 Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Tue, 20 Jan 2015 20:34:09 -0700 Subject: Edit group members via API Add an API endpoint to update the access level of an existing group member. --- lib/api/helpers.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/api/helpers.rb') 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 -- cgit v1.2.1