Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Oct 14, 2024
1 parent 81aec6d commit 9e248b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion routers/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,10 @@ func registerRoutes(m *web.Router) {
}, context.RepoMustNotBeArchived())
})
}, repo.MustAllowPulls)
}, ignSignIn, context.RepoAssignment, context.RequireRepoReaderOr(unit.TypeCode, unit.TypePullRequests))
// end "/{username}/{reponame}": pull request view/edit

m.Group("/pulls/{index}", func() {
m.Group("/media", func() {
m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.SingleDownloadOrLFS)
m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.SingleDownloadOrLFS)
Expand Down Expand Up @@ -1585,7 +1588,7 @@ func registerRoutes(m *web.Router) {
m.Get("/commit/{sha:([a-f0-9]{7,64})}.{ext:patch|diff}", repo.MustBeNotEmpty, repo.RawDiff)
m.Post("/lastcommit/*", context.RepoRefByType(context.RepoRefCommit), repo.LastCommit)
}, ignSignIn, context.RepoAssignment, reqRepoCodeReader)
// end "/{username}/{reponame}": repo code
// end "/{username}/{reponame}": pull request code

m.Group("/{username}/{reponame}", func() {
m.Get("/stars", repo.Stars)
Expand Down

0 comments on commit 9e248b5

Please sign in to comment.