Skip to content

Commit 2055fa3

Browse files
author
Gusted
committed
Add write check for creating Commit status (go-gitea#20332)
- Backport go-gitea#20332 - Add write code checks for creating new commit status - Regression from go-gitea#5314 - Resolves go-gitea#20331
1 parent 54ef658 commit 2055fa3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: routers/api/v1/api.go

+1-1
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)