mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	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>
This commit is contained in:
		
				
					committed by
					
						 Lauris BH
						Lauris BH
					
				
			
			
				
	
			
			
			
						parent
						
							d3468ed79f
						
					
				
				
					commit
					18e0447b3f
				
			| @@ -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 | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user