diff options
author | Toon Claes <toon@gitlab.com> | 2018-03-30 15:16:24 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2018-08-20 17:25:02 +0300 |
commit | 7c9983c721ab47d25c9d437035e04b385e8af7c9 (patch) | |
tree | 283e3de3d64f1c3a61ceee4dbed332096790f760 /lib/api/projects.rb | |
parent | 3c80adf5c8486315fa84ac237177c38b9ae625c9 (diff) |
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.
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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]) |