diff options
author | zeripath <art27@cantab.net> | 2022-02-02 10:10:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-02 11:10:06 +0100 |
commit | 76e31115965164112a6dfdbd297632431e896e5e (patch) | |
tree | 419d281e6efeb703a6076b16d11759ea2072c75c /modules/gitgraph | |
parent | 92e81e97e848f95af437694297105ec8fa18365e (diff) | |
download | gitea-76e31115965164112a6dfdbd297632431e896e5e.tar.gz gitea-76e31115965164112a6dfdbd297632431e896e5e.zip |
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>
Diffstat (limited to 'modules/gitgraph')
-rw-r--r-- | modules/gitgraph/graph_models.go | 2 |
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{}) |