Skip to content

Commit b8ab929

Browse files
author
Gusted
authored
Add write check for creating Commit status (#20332) (#20333)
- Backport #20332 - Add write code checks for creating new commit status - Regression from #5314 - Resolves #20331
1 parent 54ef658 commit b8ab929

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ func Routes() *web.Route {
10101010
}, mustAllowPulls, reqRepoReader(unit.TypeCode), context.ReferencesGitRepo())
10111011
m.Group("/statuses", func() {
10121012
m.Combo("/{sha}").Get(repo.GetCommitStatuses).
1013-
Post(reqToken(), bind(api.CreateStatusOption{}), repo.NewCommitStatus)
1013+
Post(reqToken(), reqRepoWriter(unit.TypeCode), bind(api.CreateStatusOption{}), repo.NewCommitStatus)
10141014
}, reqRepoReader(unit.TypeCode))
10151015
m.Group("/commits", func() {
10161016
m.Get("", context.ReferencesGitRepo(), repo.GetAllCommits)

0 commit comments

Comments
 (0)