0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-09-25 10:39:01 +02:00
This commit is contained in:
6543 2020-04-14 18:29:31 +02:00 committed by GitHub
parent 10e2f29144
commit f7ecc2bee7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -535,6 +535,9 @@ 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 user == nil {
return false, nil
}
err := pr.LoadProtectedBranch()
if err != nil {