diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-06 22:57:24 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-06 22:57:24 -0800 |
commit | 7c408960ce9cf8a20941c99fd64aa5b1f472f9a0 (patch) | |
tree | 7e81d11387865cd41279c6ba2672c019e1550052 /lib/api/groups.rb | |
parent | 52bf5b0e78edeb1acc8254b00ba164d48a88f39e (diff) | |
parent | 47abdc10ca7daceac8206a65166b42409a76b459 (diff) | |
download | gitlab-ce-7c408960ce9cf8a20941c99fd64aa5b1f472f9a0.tar.gz |
Merge pull request #3146 from amacarthur/AdminAPIs
Additional Admin APIs
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r-- | lib/api/groups.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb index a67caef0bc5..464a2d15662 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -51,6 +51,24 @@ module Gitlab not_found! end end + + # Transfer a project to the Group namespace + # + # Parameters: + # id - group id + # project_id - project id + # Example Request: + # POST /groups/:id/projects/:project_id + post ":id/projects/:project_id" do + authenticated_as_admin! + @group = Group.find(params[:id]) + project = Project.find(params[:project_id]) + if project.transfer(@group) + present @group + else + not_found! + end + end end end end |