summaryrefslogtreecommitdiff
path: root/lib/api/groups.rb
diff options
context:
space:
mode:
authorSebastian Ziebell <sebastian.ziebell@asquera.de>2013-03-07 14:51:56 +0100
committerSebastian Ziebell <sebastian.ziebell@asquera.de>2013-03-07 14:51:56 +0100
commit3374027e3a4e4eb040e59294a9ced9d7886a71e2 (patch)
tree4587984396a32047a6337e7810a39633ba683545 /lib/api/groups.rb
parent39114d259c6e4bd5bb60b18f561d06cc24e8c852 (diff)
parent9c2a6e201388e7e30987a8679ddfa65b9422a38c (diff)
downloadgitlab-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.rb18
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