enforce reqRepoReader(unit.TypeIssues) GET /repos/{owner}/{repo}/issues/pinned

(cherry picked from commit 00fad97fc1b27db40a002c9ab3f709d04dc2cdd1)
This commit is contained in:
Loïc Dachary 2023-11-02 15:41:10 +01:00
parent 84f8a8292e
commit cb6b7f1050
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -1267,7 +1267,7 @@ func Routes() *web.Route {
m.Group("/issues", func() { m.Group("/issues", func() {
m.Combo("").Get(repo.ListIssues). m.Combo("").Get(repo.ListIssues).
Post(reqToken(), mustNotBeArchived, bind(api.CreateIssueOption{}), repo.CreateIssue) Post(reqToken(), mustNotBeArchived, bind(api.CreateIssueOption{}), repo.CreateIssue)
m.Get("/pinned", repo.ListPinnedIssues) m.Get("/pinned", reqRepoReader(unit.TypeIssues), repo.ListPinnedIssues)
m.Group("/comments", func() { m.Group("/comments", func() {
m.Get("", repo.ListRepoIssueComments) m.Get("", repo.ListRepoIssueComments)
m.Group("/{id}", func() { m.Group("/{id}", func() {