diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-03 12:22:44 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-03 12:28:47 +0200 |
commit | ed097df62758880eb6412770f661266d4a6e9299 (patch) | |
tree | 488f682bac4c5c9762823a1055f85f9e5c88eca0 /app/helpers/projects_helper.rb | |
parent | a243e44ca1ee57dc28ef72bd3521c17726ba5026 (diff) | |
download | gitlab-ce-ed097df62758880eb6412770f661266d4a6e9299.tar.gz |
Clean up code.
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r-- | app/helpers/projects_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index e3734023be3..ebbd2bfd77d 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -127,6 +127,14 @@ module ProjectsHelper html + count_html end + def project_for_deploy_key(deploy_key) + if deploy_key.projects.include?(@project) + @project + else + deploy_key.projects.find { |project| can?(current_user, :read_project, project) } + end + end + private def get_project_nav_tabs(project, current_user) |