@@ -473,25 +473,26 @@ func RegisterRoutes(m *macaron.Macaron) {
473473 m .Post ("/milestone" , repo .UpdateIssueMilestone , reqRepoWriter )
474474 m .Post ("/assignee" , repo .UpdateIssueAssignee , reqRepoWriter )
475475 m .Post ("/status" , repo .UpdateIssueStatus , reqRepoWriter )
476- })
476+ }, context . CheckUnit ( models . UnitTypeIssues ) )
477477 m .Group ("/comments/:id" , func () {
478478 m .Post ("" , repo .UpdateCommentContent )
479479 m .Post ("/delete" , repo .DeleteComment )
480- })
480+ }, context . CheckUnit ( models . UnitTypeIssues ) )
481481 m .Group ("/labels" , func () {
482482 m .Post ("/new" , bindIgnErr (auth.CreateLabelForm {}), repo .NewLabel )
483483 m .Post ("/edit" , bindIgnErr (auth.CreateLabelForm {}), repo .UpdateLabel )
484484 m .Post ("/delete" , repo .DeleteLabel )
485485 m .Post ("/initialize" , bindIgnErr (auth.InitializeLabelsForm {}), repo .InitializeLabels )
486- }, reqRepoWriter , context .RepoRef ())
486+ }, reqRepoWriter , context .RepoRef (), context . CheckUnit ( models . UnitTypeIssues ) )
487487 m .Group ("/milestones" , func () {
488488 m .Combo ("/new" ).Get (repo .NewMilestone ).
489489 Post (bindIgnErr (auth.CreateMilestoneForm {}), repo .NewMilestonePost )
490490 m .Get ("/:id/edit" , repo .EditMilestone )
491491 m .Post ("/:id/edit" , bindIgnErr (auth.CreateMilestoneForm {}), repo .EditMilestonePost )
492492 m .Get ("/:id/:action" , repo .ChangeMilestonStatus )
493493 m .Post ("/delete" , repo .DeleteMilestone )
494- }, reqRepoWriter , context .RepoRef ())
494+ }, reqRepoWriter , context .RepoRef (), context .CheckUnit (models .UnitTypeIssues ))
495+
495496
496497 m .Combo ("/compare/*" , repo .MustAllowPulls , repo .SetEditorconfigIfExists ).
497498 Get (repo .CompareAndPullRequest ).
@@ -523,7 +524,7 @@ func RegisterRoutes(m *macaron.Macaron) {
523524 return
524525 }
525526 })
526- }, reqSignIn , context .RepoAssignment (), context .UnitTypes (), context .LoadRepoUnits (), context . CheckUnit ( models . UnitTypeIssues ) )
527+ }, reqSignIn , context .RepoAssignment (), context .UnitTypes (), context .LoadRepoUnits ())
527528
528529 // Releases
529530 m .Group ("/:username/:reponame" , func () {
@@ -558,7 +559,7 @@ func RegisterRoutes(m *macaron.Macaron) {
558559 m .Get ("/^:type(issues|pulls)$/:index" , repo .ViewIssue )
559560 m .Get ("/labels/" , repo .RetrieveLabels , repo .Labels )
560561 m .Get ("/milestones" , repo .Milestones )
561- }, context .RepoRef (), context . CheckUnit ( models . UnitTypeIssues ) )
562+ }, context .RepoRef ())
562563
563564 // m.Get("/branches", repo.Branches)
564565 m .Post ("/branches/:name/delete" , reqSignIn , reqRepoWriter , repo .MustBeNotBare , repo .DeleteBranchPost )
0 commit comments