diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-07-10 14:03:00 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-07-10 14:03:00 +0300 |
commit | 6a9aed1e878bc8651243d645d0a9d2f7da33f248 (patch) | |
tree | b70a5bb88b89676130271207029df4eaba0dc573 /lib/api/helpers.rb | |
parent | 223d26405128a64f624b78e7d4b03565d1e85a69 (diff) | |
parent | 381638b77f68004dd9b5607eacceb3cee5b2bf3c (diff) | |
download | gitlab-ce-6a9aed1e878bc8651243d645d0a9d2f7da33f248.tar.gz |
Merge branch 'master' into 6-0-dev
Conflicts:
CHANGELOG
VERSION
app/views/admin/teams/projects/new.html.haml
app/views/projects/teams/available.html.haml
doc/install/installation.md
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 |