mirror of
				https://gitcode.com/gitea/gitea.git
				synced 2025-10-31 08:28:38 +08:00 
			
		
		
		
	Remove unnecessary permissions load (#9796)
Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
		 Lunny Xiao
					Lunny Xiao
				
			
				
					committed by
					
						 Antoine GIRARD
						Antoine GIRARD
					
				
			
			
				
	
			
			
			 Antoine GIRARD
						Antoine GIRARD
					
				
			
						parent
						
							f740943df4
						
					
				
				
					commit
					dbd89acf98
				
			| @ -600,13 +600,7 @@ func MergePullRequest(ctx *context.APIContext, form auth.MergePullRequestForm) { | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	perm, err := models.GetUserRepoPermission(ctx.Repo.Repository, ctx.User) | ||||
| 	if err != nil { | ||||
| 		ctx.Error(http.StatusInternalServerError, "GetUserRepoPermission", err) | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	allowedMerge, err := pull_service.IsUserAllowedToMerge(pr, perm, ctx.User) | ||||
| 	allowedMerge, err := pull_service.IsUserAllowedToMerge(pr, ctx.Repo.Permission, ctx.User) | ||||
| 	if err != nil { | ||||
| 		ctx.Error(http.StatusInternalServerError, "IsUSerAllowedToMerge", err) | ||||
| 		return | ||||
|  | ||||
		Reference in New Issue
	
	Block a user