diff options
author | Toon Claes <toon@gitlab.com> | 2018-03-30 14:16:24 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2018-03-30 14:24:21 +0200 |
commit | f940ab2044e7f7cf2b6b4450f1755ae8d8bb2c41 (patch) | |
tree | 31a3d16ba91bd34cfa32379e013566a9f9da9c92 /lib/api/projects.rb | |
parent | d2b47c76bbc3704f2875c99c857d50e986f2315e (diff) | |
download | gitlab-ce-tc-api-fork-owners.tar.gz |
Allow project owners to set up forking relation through APItc-api-fork-owners
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 467bc78dad8..7ea02fce973 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -378,7 +378,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]) |