summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-02-03 16:20:37 +0000
committerGitHub <noreply@github.com>2022-02-03 11:20:37 -0500
commitbc196a35e1c74f26d941aefbfde1733c2a989a6b (patch)
treec107fa362b9e505312eec5f9814fec2a1daacc80 /modules
parent8d31cfbfff63d01150c131e674708ee7ed2e430d (diff)
downloadgitea-bc196a35e1c74f26d941aefbfde1733c2a989a6b.tar.gz
gitea-bc196a35e1c74f26d941aefbfde1733c2a989a6b.zip
Collaborator trust model should trust collaborators (#18539) (#18557)
Backport #18539 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> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/gitgraph/graph_models.go2
1 files changed, 1 insertions, 1 deletions
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{})