diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-01-14 21:35:51 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-01-14 21:35:51 +0000 |
commit | 28c23d99c11a347ed9bd23b8778d5aeb44f3bf43 (patch) | |
tree | 86f702bb9ceee092fd537da2793504cdbf98dc82 /lib | |
parent | bf8e174f0ae21b320c17b5a8f8d45aefcfef9520 (diff) | |
parent | 0b5b3ec3a432842bc53c7226c6db98e484aeee50 (diff) | |
download | gitlab-ce-28c23d99c11a347ed9bd23b8778d5aeb44f3bf43.tar.gz |
Merge branch '25018-gitlab-checks-changeaccess-looks-for-user-permissions-that-don-t-exist' into 'master'
Resolve "`Gitlab::Checks::ChangeAccess` looks for user permissions that don't exist"
Closes #25018
See merge request !8551
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/checks/change_access.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/checks/change_access.rb b/lib/gitlab/checks/change_access.rb index 9c391fa92a3..273118135a9 100644 --- a/lib/gitlab/checks/change_access.rb +++ b/lib/gitlab/checks/change_access.rb @@ -30,9 +30,9 @@ module Gitlab return unless @branch_name return unless project.protected_branch?(@branch_name) - if forced_push? && user_access.cannot_do_action?(:force_push_code_to_protected_branches) + if forced_push? return "You are not allowed to force push code to a protected branch on this project." - elsif Gitlab::Git.blank_ref?(@newrev) && user_access.cannot_do_action?(:remove_protected_branches) + elsif Gitlab::Git.blank_ref?(@newrev) return "You are not allowed to delete protected branches from this project." end |