diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-24 14:10:55 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-24 14:11:48 +0100 |
commit | 4830b2be5e076126f89d2c67bab94302559aa93a (patch) | |
tree | ed221ec195ff15ab3365701838e89b6698682ded /app/helpers | |
parent | 2953e0d19b46a937ee9d84139adbc263c8e89757 (diff) | |
download | gitlab-ce-4830b2be5e076126f89d2c67bab94302559aa93a.tar.gz |
Refactor GitAccess to use instance variables.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/branches_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/tree_helper.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/branches_helper.rb b/app/helpers/branches_helper.rb index 4a5edf6d101..d6eaa7d57bc 100644 --- a/app/helpers/branches_helper.rb +++ b/app/helpers/branches_helper.rb @@ -12,6 +12,6 @@ module BranchesHelper def can_push_branch?(project, branch_name) return false unless project.repository.branch_names.include?(branch_name) - ::Gitlab::GitAccess.can_push_to_branch?(current_user, project, branch_name) + ::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(branch_name) end end diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index b6fb7a8aa5a..bf6726574ec 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -56,7 +56,7 @@ module TreeHelper ref ||= @ref return false unless project.repository.branch_names.include?(ref) - ::Gitlab::GitAccess.can_push_to_branch?(current_user, project, ref) + ::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(ref) end def tree_breadcrumbs(tree, max_links = 2) |