summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorHan Loong Liauw <hanloongliauw@gmail.com>2015-10-14 09:04:22 +1100
committerHan Loong Liauw <hanloongliauw@gmail.com>2015-10-14 20:19:41 +1100
commit0bea5ced8bf4c9306f8f8e912313731a43d16f4c (patch)
tree59c92b92d21fc88d14c4e838c613b0caae38de79 /lib/api/projects.rb
parent520d85099ff34882d865c3fa885a7f3335b41cb2 (diff)
downloadgitlab-ce-0bea5ced8bf4c9306f8f8e912313731a43d16f4c.tar.gz
Made suggested content changes based on MR Review
Changed the authentication method for removing fork through API Reflected changes to new auth method in API specs
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index e8a0e7f3ec9..67ee66a2058 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -246,7 +246,7 @@ module API
# Example Request:
# DELETE /projects/:id/fork
delete ":id/fork" do
- authenticated_as_admin!
+ authorize! :remove_fork_project, user_project
if user_project.forked?
user_project.forked_project_link.destroy
end