summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDavid Svantesson <davidsvantesson@gmail.com>2020-01-16 22:01:22 +0100
committerLauris BH <lauris@nix.lv>2020-01-16 23:01:22 +0200
commit18e0447b3f65cb6aab2eec6b742edf911773097f (patch)
treeda114d81702842af266da59ca88a700dfee91c7b /services
parentd3468ed79fd9e3b29521fa6318492479041696ac (diff)
downloadgitea-18e0447b3f65cb6aab2eec6b742edf911773097f.tar.gz
gitea-18e0447b3f65cb6aab2eec6b742edf911773097f.zip
Fix admin handling at merge of PR (#9749)
* Admin shall be able to bypass merge checks. * Repository admin should not bypass if merge whitelist is set. * Add code comment about checks that PR are ready * notAllOverrideableChecksOk->notAllOverridableChecksOk * Fix merge, require signed currently not overridable. * fix Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Diffstat (limited to 'services')
-rw-r--r--services/pull/merge.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go
index 5e077f6dc0..b423c663ea 100644
--- a/services/pull/merge.go
+++ b/services/pull/merge.go
@@ -487,9 +487,6 @@ func IsSignedIfRequired(pr *models.PullRequest, doer *models.User) (bool, error)
// IsUserAllowedToMerge check if user is allowed to merge PR with given permissions and branch protections
func IsUserAllowedToMerge(pr *models.PullRequest, p models.Permission, user *models.User) (bool, error) {
- if p.IsAdmin() {
- return true, nil
- }
if !p.CanWrite(models.UnitTypeCode) {
return false, nil
}