mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 07:47:02 +02:00
- Backport #20332 - Add write code checks for creating new commit status - Regression from #5314 - Resolves #20331
This commit is contained in:
1 parent
7c80a0b630
commit
0f89417d75
1 file changed
+1
-1
@@ -954,7 +954,7 @@ func Routes(sessioner func(http.Handler) http.Handler) *web.Route {
|
|||||||
}, mustAllowPulls, reqRepoReader(unit.TypeCode), context.ReferencesGitRepo(false))
|
}, mustAllowPulls, reqRepoReader(unit.TypeCode), context.ReferencesGitRepo(false))
|
||||||
m.Group("/statuses", func() {
|
m.Group("/statuses", func() {
|
||||||
m.Combo("/{sha}").Get(repo.GetCommitStatuses).
|
m.Combo("/{sha}").Get(repo.GetCommitStatuses).
|
||||||
Post(reqToken(), bind(api.CreateStatusOption{}), repo.NewCommitStatus)
|
Post(reqToken(), reqRepoWriter(unit.TypeCode), bind(api.CreateStatusOption{}), repo.NewCommitStatus)
|
||||||
}, reqRepoReader(unit.TypeCode))
|
}, reqRepoReader(unit.TypeCode))
|
||||||
m.Group("/commits", func() {
|
m.Group("/commits", func() {
|
||||||
m.Get("", repo.GetAllCommits)
|
m.Get("", repo.GetAllCommits)
|
||||||
|
|||||||
Reference in new issue
Block a user