summaryrefslogtreecommitdiff
path: root/lib/gitlab/user_access.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-04-02 18:30:49 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-04-10 15:46:20 +0200
commit05732d90da0c556d6857bb4c1acd46d676dd07ba (patch)
treed26527f4ca748fc65b7e178e61cbd6631d591e51 /lib/gitlab/user_access.rb
parent9d220da84117220317ccff1421a394185fefe859 (diff)
downloadgitlab-ce-05732d90da0c556d6857bb4c1acd46d676dd07ba.tar.gz
Rename delete_protected_branch ability to push_to_delete_protected_branch to prevent confusion with destroy_protected_branch
Diffstat (limited to 'lib/gitlab/user_access.rb')
-rw-r--r--lib/gitlab/user_access.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/user_access.rb b/lib/gitlab/user_access.rb
index 24393f96d96..69952cbb47c 100644
--- a/lib/gitlab/user_access.rb
+++ b/lib/gitlab/user_access.rb
@@ -51,7 +51,7 @@ module Gitlab
return false unless can_access_git?
if protected?(ProtectedBranch, project, ref)
- user.can?(:delete_protected_branch, project)
+ user.can?(:push_to_delete_protected_branch, project)
else
user.can?(:push_code, project)
end