Skip to content

Commit 4856832

Browse files
Gustedzeripath
authored and
Sysoev, Vladimir
committed
Add write check for creating Commit status (go-gitea#20332)
- Add write code checks for creating new commit status - Regression go-gitea#5314 Co-authored-by: zeripath <[email protected]>
1 parent d9d48d9 commit 4856832

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
@@ -1017,7 +1017,7 @@ func Routes() *web.Route {
10171017
}, mustAllowPulls, reqRepoReader(unit.TypeCode), context.ReferencesGitRepo())
10181018
m.Group("/statuses", func() {
10191019
m.Combo("/{sha}").Get(repo.GetCommitStatuses).
1020-
Post(reqToken(), bind(api.CreateStatusOption{}), repo.NewCommitStatus)
1020+
Post(reqToken(), reqRepoWriter(unit.TypeCode), bind(api.CreateStatusOption{}), repo.NewCommitStatus)
10211021
}, reqRepoReader(unit.TypeCode))
10221022
m.Group("/commits", func() {
10231023
m.Get("", context.ReferencesGitRepo(), repo.GetAllCommits)

0 commit comments

Comments
 (0)