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 /routers/web/repo/view.go | |
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 'routers/web/repo/view.go')
-rw-r--r-- | routers/web/repo/view.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 150ace212b..7c6f031907 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -799,7 +799,7 @@ func renderDirectoryFiles(ctx *context.Context, timeout time.Duration) git.Entri verification := asymkey_model.ParseCommitWithSignature(latestCommit) 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 nil |