summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-09-13 11:05:44 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2016-09-13 11:05:44 +0000
commitd77dc5843e2fdf46522113f51c8c49e6cff5225b (patch)
treeddd1f8de2010aab6eae78af9d0b4413f3f256262
parent8e13aa14782e09c7c28cea0d1ecfe12b151dab78 (diff)
parent08871cc36ac5ffea541ea5b5e7666327e65c6b9d (diff)
downloadgitlab-ce-d77dc5843e2fdf46522113f51c8c49e6cff5225b.tar.gz
Merge branch 'avoid-loading-protected-branches-on-change-access-checks' into 'master'
Avoid protected branches checks when verifying access without branch name See merge request !6317
-rw-r--r--CHANGELOG1
-rw-r--r--lib/gitlab/checks/change_access.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index dc8dbb6e166..8ccb586f6e8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -115,6 +115,7 @@ v 8.12.0 (unreleased)
- Avoid conflict with admin labels when importing GitHub labels
- User can edit closed MR with deleted fork (Katarzyna Kobierska Ula Budziszewska) !5496
- Fix repository page ui issues
+ - Avoid protected branches checks when verifying access without branch name
- Add information about user and manual build start to runner as variables !6201 (Sergey Gnuskov)
- Fixed invisible scroll controls on build page on iPhone
- Fix error on raw build trace download for old builds stored in database !4822
diff --git a/lib/gitlab/checks/change_access.rb b/lib/gitlab/checks/change_access.rb
index 4b32eb966aa..cb1065223d4 100644
--- a/lib/gitlab/checks/change_access.rb
+++ b/lib/gitlab/checks/change_access.rb
@@ -23,6 +23,7 @@ module Gitlab
protected
def protected_branch_checks
+ 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)