mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Collaborator trust model should trust collaborators (#18539)
* Collaborator trust model should trust collaborators There was an unintended regression in #17917 which leads to only repository admin commits being trusted. This PR restores the old logic. Fix #18501 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		| @@ -351,7 +351,7 @@ func Diff(ctx *context.Context) { | ||||
| 	ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0 | ||||
|  | ||||
| 	if err := asymkey_model.CalculateTrustStatus(verification, ctx.Repo.Repository.GetTrustModel(), func(user *user_model.User) (bool, error) { | ||||
| 		return models.IsUserRepoAdmin(ctx.Repo.Repository, user) | ||||
| 		return models.IsOwnerMemberCollaborator(ctx.Repo.Repository, user.ID) | ||||
| 	}, nil); err != nil { | ||||
| 		ctx.ServerError("CalculateTrustStatus", err) | ||||
| 		return | ||||
|   | ||||
		Reference in New Issue
	
	Block a user