From 7c9983c721ab47d25c9d437035e04b385e8af7c9 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Fri, 30 Mar 2018 14:16:24 +0200 Subject: Allow project owners to set up forking relation through API Before this change only GitLab admins where allowed to set up forking relation through the API. This changes that so project owners can do this too. Closes gitlab-org/gitlab-ce#40550. --- lib/api/projects.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/api/projects.rb') diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 5738bf220c6..2801ae918c6 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -386,7 +386,7 @@ module API requires :forked_from_id, type: String, desc: 'The ID of the project it was forked from' end post ":id/fork/:forked_from_id" do - authenticated_as_admin! + authorize! :admin_project, user_project fork_from_project = find_project!(params[:forked_from_id]) -- cgit v1.2.1