1
1
espelhamento de https://github.com/go-gitea/gitea sincronizado 2025-12-07 13:28:25 +00:00

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>
Esse commit está contido em:
zeripath
2020-08-22 21:35:56 +01:00
commit de GitHub
commit a687980412
3 arquivos alterados com 9 adições e 4 exclusões
+1 -1
Ver Arquivo
@@ -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
}