diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-21 10:24:06 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-21 10:24:06 +0200 |
commit | d37cf6423759e445f0bff5121eb1ed1467ae0fd1 (patch) | |
tree | a82936658ac1058e96d535af7ef17ca0eb5bf790 /lib/api/projects.rb | |
parent | d9944fdb59fe286022130f133f316b80dec04ea6 (diff) | |
parent | 35618a3dfffe546744123bcaf560ba9f74c42eef (diff) | |
download | gitlab-ce-d37cf6423759e445f0bff5121eb1ed1467ae0fd1.tar.gz |
Merge branch 'master' into hanloong/gitlab-ce-add-dates-snippets-show
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index c2fb36b4143..67ee66a2058 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -246,8 +246,8 @@ module API # Example Request: # DELETE /projects/:id/fork delete ":id/fork" do - authenticated_as_admin! - unless user_project.forked_project_link.nil? + authorize! :remove_fork_project, user_project + if user_project.forked? user_project.forked_project_link.destroy end end |