diff options
author | Valery Sizov <valery@gitlab.com> | 2015-01-21 02:23:37 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-01-21 04:34:23 +0300 |
commit | ab7a79bf3bb47fd1c9d82da0bb29a3cdf0246cdc (patch) | |
tree | 7a32b98b19476c6ca633f9cb907f3f9c6e1f6bb8 /app/helpers/tree_helper.rb | |
parent | 148740cc6769b0faf7ee564552143ccd0a18768b (diff) |
developer can push to protected branches
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r-- | app/helpers/tree_helper.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index d316213b1fd..133b0dfae9b 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -58,11 +58,7 @@ module TreeHelper ref ||= @ref return false unless project.repository.branch_names.include?(ref) - if project.protected_branch? ref - can?(current_user, :push_code_to_protected_branches, project) - else - can?(current_user, :push_code, project) - end + ::Gitlab::GitAccess.can_push_to_branch?(current_user, project, ref) end def edit_blob_link(project, ref, path, options = {}) |