diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-11 21:09:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-11 21:09:23 +0300 |
commit | 9d195600e6266da44917f08c622a21a6d4c2317b (patch) | |
tree | 4693fc9ee5e1ee1dc8fc39414f59976da188573b /lib/gitlab/checks | |
parent | 9c0f4306f6779e40acc3943d7050b706633da93e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/checks')
-rw-r--r-- | lib/gitlab/checks/branch_check.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/checks/branch_check.rb b/lib/gitlab/checks/branch_check.rb index ad2a718ef67..a8287a97cc3 100644 --- a/lib/gitlab/checks/branch_check.rb +++ b/lib/gitlab/checks/branch_check.rb @@ -51,7 +51,7 @@ module Gitlab logger.log_timed(LOG_MESSAGES[:protected_branch_checks]) do return unless ProtectedBranch.protected?(project, branch_name) # rubocop:disable Cop/AvoidReturnFromBlocks - if forced_push? + if forced_push? && !ProtectedBranch.allow_force_push?(project, branch_name) raise GitAccess::ForbiddenError, ERROR_MESSAGES[:force_push_protected_branch] end end |