Skip to content

Commit fb14ca3

Browse files
GiteaBotwxiaoguang
andauthored
1 parent a672f06 commit fb14ca3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

routers/web/web.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,9 @@ func registerRoutes(m *web.Route) {
11251125
// user/org home, including rss feeds
11261126
m.Get("/{username}/{reponame}", ignSignIn, context.RepoAssignment, context.RepoRef(), repo.SetEditorconfigIfExists, repo.Home)
11271127

1128+
// TODO: maybe it should relax the permission to allow "any access"
1129+
m.Post("/{username}/{reponame}/markup", ignSignIn, context.RepoAssignment, context.RequireRepoReaderOr(unit.TypeCode, unit.TypeIssues, unit.TypePullRequests, unit.TypeReleases, unit.TypeWiki), web.Bind(structs.MarkupOption{}), misc.Markup)
1130+
11281131
m.Group("/{username}/{reponame}", func() {
11291132
m.Get("/find/*", repo.FindFiles)
11301133
m.Group("/tree-list", func() {
@@ -1236,8 +1239,6 @@ func registerRoutes(m *web.Route) {
12361239
m.Post("/reactions/{action}", web.Bind(forms.ReactionForm{}), repo.ChangeCommentReaction)
12371240
}, context.RepoMustNotBeArchived())
12381241

1239-
m.Post("/markup", web.Bind(structs.MarkupOption{}), misc.Markup)
1240-
12411242
m.Group("/labels", func() {
12421243
m.Post("/new", web.Bind(forms.CreateLabelForm{}), repo.NewLabel)
12431244
m.Post("/edit", web.Bind(forms.CreateLabelForm{}), repo.UpdateLabel)

0 commit comments

Comments
 (0)