diff options
author | zeripath <art27@cantab.net> | 2020-08-22 21:35:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-22 23:35:56 +0300 |
commit | a687980412cb30566b68e85d40780efd97e57214 (patch) | |
tree | 07d90f36d908f0045b20533abf120c175e5b1444 /services | |
parent | 1f85815a3b5bf2df380b32818754ae0e183280b0 (diff) | |
download | gitea-a687980412cb30566b68e85d40780efd97e57214.tar.gz gitea-a687980412cb30566b68e85d40780efd97e57214.zip |
Default empty merger list to those with write permissions (#12535) (#12560)
Backport #12535
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'services')
-rw-r--r-- | services/pull/merge.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go index 47521ce147..27689384a5 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -544,7 +544,7 @@ func IsUserAllowedToMerge(pr *models.PullRequest, p models.Permission, user *mod return false, err } - if (p.CanWrite(models.UnitTypeCode) && pr.ProtectedBranch == nil) || (pr.ProtectedBranch != nil && pr.ProtectedBranch.IsUserMergeWhitelisted(user.ID)) { + if (p.CanWrite(models.UnitTypeCode) && pr.ProtectedBranch == nil) || (pr.ProtectedBranch != nil && pr.ProtectedBranch.IsUserMergeWhitelisted(user.ID, p)) { return true, nil } |