diff options
author | Angus MacArthur <amacarthur@blackberry.com> | 2013-06-27 17:49:26 -0400 |
---|---|---|
committer | Angus MacArthur <amacarthur@blackberry.com> | 2013-07-08 17:34:00 -0400 |
commit | ea5a006f27cfd3013f94652e0e0f0e63091036ad (patch) | |
tree | af0e150d45b1f9102245595a3a5b14637b5809aa /lib/api/helpers.rb | |
parent | 7ebbb6e33f872651c8f92799570d58353a4a08b3 (diff) | |
download | gitlab-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.rb | 6 |
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 |