|
|
@@ -966,7 +966,7 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
}, reqSignIn) |
|
|
|
|
|
|
|
// ***** Release Attachment Download without Signin |
|
|
|
m.Get("/:username/:reponame/releases/download/:vTag/:fileName", ignSignIn, context.RepoAssignment(), repo.MustBeNotEmpty, repo.RedirectDownload) |
|
|
|
m.Get("/:username/:reponame/releases/download/:vTag/:fileName", ignSignIn, context.LowLimiter(), context.RepoAssignment(), repo.MustBeNotEmpty, repo.RedirectDownload) |
|
|
|
|
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
|
m.Group("/settings", func() { |
|
|
@@ -1060,7 +1060,7 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
m.Combo("/compare/*", repo.MustBeNotEmpty, reqRepoCodeReader, repo.SetEditorconfigIfExists). |
|
|
|
Get(repo.SetDiffViewStyle, repo.CompareDiff). |
|
|
|
Post(reqSignIn, context.RepoMustNotBeArchived(), reqRepoPullsReader, repo.MustAllowPulls, bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost) |
|
|
|
}, context.RepoAssignment(), context.UnitTypes()) |
|
|
|
}, context.LowLimiter(), context.RepoAssignment(), context.UnitTypes()) |
|
|
|
|
|
|
|
// Grouping for those endpoints that do require authentication |
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
@@ -1187,7 +1187,7 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
} |
|
|
|
ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount |
|
|
|
}) |
|
|
|
}, ignSignIn, context.RepoAssignment(), context.UnitTypes(), reqRepoReleaseReader) |
|
|
|
}, ignSignIn, context.LowLimiter(), context.RepoAssignment(), context.UnitTypes(), reqRepoReleaseReader) |
|
|
|
|
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
|
m.Post("/topics", repo.TopicsPost) |
|
|
@@ -1583,18 +1583,18 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
}, context.RepoRef(), reqRepoCodeReader) |
|
|
|
m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", |
|
|
|
repo.MustBeNotEmpty, reqRepoCodeReader, repo.RawDiff) |
|
|
|
}, ignSignIn, context.RepoAssignment(), context.UnitTypes()) |
|
|
|
}, ignSignIn, context.LowLimiter(), context.RepoAssignment(), context.UnitTypes()) |
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
|
m.Get("/stars", repo.Stars) |
|
|
|
m.Get("/watchers", repo.Watchers) |
|
|
|
m.Get("/search", reqRepoCodeReader, repo.Search) |
|
|
|
}, ignSignIn, context.RepoAssignment(), context.RepoRef(), context.UnitTypes()) |
|
|
|
}, ignSignIn, context.LowLimiter(), context.RepoAssignment(), context.RepoRef(), context.UnitTypes()) |
|
|
|
|
|
|
|
m.Group("/:username", func() { |
|
|
|
m.Group("/:reponame", func() { |
|
|
|
m.Get("", repo.SetEditorconfigIfExists, repo.Home) |
|
|
|
m.Get("\\.git$", repo.SetEditorconfigIfExists, repo.Home) |
|
|
|
}, ignSignIn, context.RepoAssignment(), context.RepoRef(), context.UnitTypes()) |
|
|
|
}, ignSignIn, context.HighLimiter(), context.RepoAssignment(), context.RepoRef(), context.UnitTypes()) |
|
|
|
|
|
|
|
m.Group("/:reponame", func() { |
|
|
|
m.Group("\\.git/info/lfs", func() { |
|
|
|