diff options
author | Toon Claes <toon@gitlab.com> | 2018-03-30 14:16:24 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2018-08-20 16:25:02 +0200 |
commit | 7c9983c721ab47d25c9d437035e04b385e8af7c9 (patch) | |
tree | 283e3de3d64f1c3a61ceee4dbed332096790f760 /lib | |
parent | 3c80adf5c8486315fa84ac237177c38b9ae625c9 (diff) | |
download | gitlab-ce-7c9983c721ab47d25c9d437035e04b385e8af7c9.tar.gz |
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')
-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]) |