From 76e31115965164112a6dfdbd297632431e896e5e Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 2 Feb 2022 10:10:06 +0000 Subject: 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 --- modules/gitgraph/graph_models.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gitgraph') diff --git a/modules/gitgraph/graph_models.go b/modules/gitgraph/graph_models.go index 44773a3b9a..653384252d 100644 --- a/modules/gitgraph/graph_models.go +++ b/modules/gitgraph/graph_models.go @@ -117,7 +117,7 @@ func (graph *Graph) LoadAndProcessCommits(repository *repo_model.Repository, git c.Verification = asymkey_model.ParseCommitWithSignature(c.Commit) _ = asymkey_model.CalculateTrustStatus(c.Verification, repository.GetTrustModel(), func(user *user_model.User) (bool, error) { - return models.IsUserRepoAdmin(repository, user) + return models.IsOwnerMemberCollaborator(repository, user.ID) }, &keyMap) statuses, _, err := models.GetLatestCommitStatus(repository.ID, c.Commit.ID.String(), db.ListOptions{}) -- cgit v1.2.3