summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorJan-Gerd Tenberge <janten@gmail.com>2015-10-22 21:43:17 +0200
committerJan-Gerd Tenberge <janten@gmail.com>2015-10-22 21:43:17 +0200
commitb5c19bcc4d02fd498bc95d70c39bd88ec9cdda4b (patch)
tree6eaed47ca3b65dbd622813497b18902666d23d68 /lib/api/projects.rb
parentb32bb377993fb0224ed3bd9294d752d1a82b2ef9 (diff)
parenta7174efaec77e9408900336b5941d9cca1f82ccf (diff)
downloadgitlab-ce-b5c19bcc4d02fd498bc95d70c39bd88ec9cdda4b.tar.gz
Fix merge error
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb4
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