|
|
@ -473,17 +473,17 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
m.Post("/milestone", repo.UpdateIssueMilestone, reqRepoWriter) |
|
|
|
m.Post("/milestone", repo.UpdateIssueMilestone, reqRepoWriter) |
|
|
|
m.Post("/assignee", repo.UpdateIssueAssignee, reqRepoWriter) |
|
|
|
m.Post("/assignee", repo.UpdateIssueAssignee, reqRepoWriter) |
|
|
|
m.Post("/status", repo.UpdateIssueStatus, reqRepoWriter) |
|
|
|
m.Post("/status", repo.UpdateIssueStatus, reqRepoWriter) |
|
|
|
}) |
|
|
|
}, context.CheckUnit(models.UnitTypeIssues)) |
|
|
|
m.Group("/comments/:id", func() { |
|
|
|
m.Group("/comments/:id", func() { |
|
|
|
m.Post("", repo.UpdateCommentContent) |
|
|
|
m.Post("", repo.UpdateCommentContent) |
|
|
|
m.Post("/delete", repo.DeleteComment) |
|
|
|
m.Post("/delete", repo.DeleteComment) |
|
|
|
}) |
|
|
|
}, context.CheckUnit(models.UnitTypeIssues)) |
|
|
|
m.Group("/labels", func() { |
|
|
|
m.Group("/labels", func() { |
|
|
|
m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel) |
|
|
|
m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel) |
|
|
|
m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel) |
|
|
|
m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel) |
|
|
|
m.Post("/delete", repo.DeleteLabel) |
|
|
|
m.Post("/delete", repo.DeleteLabel) |
|
|
|
m.Post("/initialize", bindIgnErr(auth.InitializeLabelsForm{}), repo.InitializeLabels) |
|
|
|
m.Post("/initialize", bindIgnErr(auth.InitializeLabelsForm{}), repo.InitializeLabels) |
|
|
|
}, reqRepoWriter, context.RepoRef()) |
|
|
|
}, reqRepoWriter, context.RepoRef(), context.CheckUnit(models.UnitTypeIssues)) |
|
|
|
m.Group("/milestones", func() { |
|
|
|
m.Group("/milestones", func() { |
|
|
|
m.Combo("/new").Get(repo.NewMilestone). |
|
|
|
m.Combo("/new").Get(repo.NewMilestone). |
|
|
|
Post(bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost) |
|
|
|
Post(bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost) |
|
|
@ -491,7 +491,8 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
m.Post("/:id/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.EditMilestonePost) |
|
|
|
m.Post("/:id/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.EditMilestonePost) |
|
|
|
m.Get("/:id/:action", repo.ChangeMilestonStatus) |
|
|
|
m.Get("/:id/:action", repo.ChangeMilestonStatus) |
|
|
|
m.Post("/delete", repo.DeleteMilestone) |
|
|
|
m.Post("/delete", repo.DeleteMilestone) |
|
|
|
}, reqRepoWriter, context.RepoRef()) |
|
|
|
}, reqRepoWriter, context.RepoRef(), context.CheckUnit(models.UnitTypeIssues)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m.Combo("/compare/*", repo.MustAllowPulls, repo.SetEditorconfigIfExists). |
|
|
|
m.Combo("/compare/*", repo.MustAllowPulls, repo.SetEditorconfigIfExists). |
|
|
|
Get(repo.CompareAndPullRequest). |
|
|
|
Get(repo.CompareAndPullRequest). |
|
|
@ -523,7 +524,7 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, reqSignIn, context.RepoAssignment(), context.UnitTypes(), context.LoadRepoUnits(), context.CheckUnit(models.UnitTypeIssues)) |
|
|
|
}, reqSignIn, context.RepoAssignment(), context.UnitTypes(), context.LoadRepoUnits()) |
|
|
|
|
|
|
|
|
|
|
|
// Releases
|
|
|
|
// Releases
|
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
@ -558,7 +559,7 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue) |
|
|
|
m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue) |
|
|
|
m.Get("/labels/", repo.RetrieveLabels, repo.Labels) |
|
|
|
m.Get("/labels/", repo.RetrieveLabels, repo.Labels) |
|
|
|
m.Get("/milestones", repo.Milestones) |
|
|
|
m.Get("/milestones", repo.Milestones) |
|
|
|
}, context.RepoRef(), context.CheckUnit(models.UnitTypeIssues)) |
|
|
|
}, context.RepoRef()) |
|
|
|
|
|
|
|
|
|
|
|
// m.Get("/branches", repo.Branches)
|
|
|
|
// m.Get("/branches", repo.Branches)
|
|
|
|
m.Post("/branches/:name/delete", reqSignIn, reqRepoWriter, repo.MustBeNotBare, repo.DeleteBranchPost) |
|
|
|
m.Post("/branches/:name/delete", reqSignIn, reqRepoWriter, repo.MustBeNotBare, repo.DeleteBranchPost) |
|
|
|