summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorAngus MacArthur <amacarthur@blackberry.com>2013-06-27 17:49:26 -0400
committerAngus MacArthur <amacarthur@blackberry.com>2013-07-08 17:34:00 -0400
commitea5a006f27cfd3013f94652e0e0f0e63091036ad (patch)
treeaf0e150d45b1f9102245595a3a5b14637b5809aa /lib/api/helpers.rb
parent7ebbb6e33f872651c8f92799570d58353a4a08b3 (diff)
downloadgitlab-ce-ea5a006f27cfd3013f94652e0e0f0e63091036ad.tar.gz
Additon of apis for fork administration.
Added ability to add and remove the forked from/to relatioinship between existing repos.
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 94cf4f2e69f..f857d4133b2 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -5,12 +5,12 @@ module API
end
def user_project
- @project ||= find_project
+ @project ||= find_project(params[:id])
@project || not_found!
end
- def find_project
- project = Project.find_by_id(params[:id]) || Project.find_with_namespace(params[:id])
+ def find_project(id)
+ project = Project.find_by_id(id) || Project.find_with_namespace(id)
if project && can?(current_user, :read_project, project)
project