diff options
author | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-03-07 14:51:56 +0100 |
---|---|---|
committer | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-03-07 14:51:56 +0100 |
commit | 3374027e3a4e4eb040e59294a9ced9d7886a71e2 (patch) | |
tree | 4587984396a32047a6337e7810a39633ba683545 /lib/api/groups.rb | |
parent | 39114d259c6e4bd5bb60b18f561d06cc24e8c852 (diff) | |
parent | 9c2a6e201388e7e30987a8679ddfa65b9422a38c (diff) | |
download | gitlab-ce-3374027e3a4e4eb040e59294a9ced9d7886a71e2.tar.gz |
Merge branch 'master' into fixes/api, code clean up and tests fixed
Conflicts:
doc/api/projects.md
spec/requests/api/projects_spec.rb
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 5aaa5eb4f54..beb615195a8 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -56,6 +56,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 |