aboutsummaryrefslogtreecommitdiffstats
path: root/models/pull.go
diff options
context:
space:
mode:
authorChri-s <Chri-s@users.noreply.github.com>2018-03-25 12:01:32 +0200
committerLauris BH <lauris@nix.lv>2018-03-25 13:01:32 +0300
commit9350ba7947d8caa6e7338d7c9e54df2f3aef2146 (patch)
treee40e1f9810c03221073742040c7fc2c93b3b7546 /models/pull.go
parent04b7fd87b9d74aa6a0c559ac218546978bbf6f33 (diff)
downloadgitea-9350ba7947d8caa6e7338d7c9e54df2f3aef2146.tar.gz
gitea-9350ba7947d8caa6e7338d7c9e54df2f3aef2146.zip
Add protected branch whitelists for merging (#3689)
* Add database migrations for merge whitelist * Add merge whitelist settings for protected branches * Add checks for merge whitelists
Diffstat (limited to 'models/pull.go')
-rw-r--r--models/pull.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/pull.go b/models/pull.go
index 137900beed..6862d11a1d 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -286,7 +286,7 @@ func (pr *PullRequest) CheckUserAllowedToMerge(doer *User) (err error) {
}
}
- if protected, err := pr.BaseRepo.IsProtectedBranch(pr.BaseBranch, doer); err != nil {
+ if protected, err := pr.BaseRepo.IsProtectedBranchForMerging(pr.BaseBranch, doer); err != nil {
return fmt.Errorf("IsProtectedBranch: %v", err)
} else if protected {
return ErrNotAllowedToMerge{