@@ -472,25 +472,26 @@ func RegisterRoutes(m *macaron.Macaron) {
472472 m .Post ("/milestone" , repo .UpdateIssueMilestone , reqRepoWriter )
473473 m .Post ("/assignee" , repo .UpdateIssueAssignee , reqRepoWriter )
474474 m .Post ("/status" , repo .UpdateIssueStatus , reqRepoWriter )
475- })
475+ }, context . CheckUnit ( models . UnitTypeIssues ) )
476476 m .Group ("/comments/:id" , func () {
477477 m .Post ("" , repo .UpdateCommentContent )
478478 m .Post ("/delete" , repo .DeleteComment )
479- })
479+ }, context . CheckUnit ( models . UnitTypeIssues ) )
480480 m .Group ("/labels" , func () {
481481 m .Post ("/new" , bindIgnErr (auth.CreateLabelForm {}), repo .NewLabel )
482482 m .Post ("/edit" , bindIgnErr (auth.CreateLabelForm {}), repo .UpdateLabel )
483483 m .Post ("/delete" , repo .DeleteLabel )
484484 m .Post ("/initialize" , bindIgnErr (auth.InitializeLabelsForm {}), repo .InitializeLabels )
485- }, reqRepoWriter , context .RepoRef ())
485+ }, reqRepoWriter , context .RepoRef (), context . CheckUnit ( models . UnitTypeIssues ) )
486486 m .Group ("/milestones" , func () {
487487 m .Combo ("/new" ).Get (repo .NewMilestone ).
488488 Post (bindIgnErr (auth.CreateMilestoneForm {}), repo .NewMilestonePost )
489489 m .Get ("/:id/edit" , repo .EditMilestone )
490490 m .Post ("/:id/edit" , bindIgnErr (auth.CreateMilestoneForm {}), repo .EditMilestonePost )
491491 m .Get ("/:id/:action" , repo .ChangeMilestonStatus )
492492 m .Post ("/delete" , repo .DeleteMilestone )
493- }, reqRepoWriter , context .RepoRef ())
493+ }, reqRepoWriter , context .RepoRef (), context .CheckUnit (models .UnitTypeIssues ))
494+
494495
495496 m .Combo ("/compare/*" , repo .MustAllowPulls , repo .SetEditorconfigIfExists ).
496497 Get (repo .CompareAndPullRequest ).
@@ -522,7 +523,7 @@ func RegisterRoutes(m *macaron.Macaron) {
522523 return
523524 }
524525 })
525- }, reqSignIn , context .RepoAssignment (), context .UnitTypes (), context .LoadRepoUnits (), context . CheckUnit ( models . UnitTypeIssues ) )
526+ }, reqSignIn , context .RepoAssignment (), context .UnitTypes (), context .LoadRepoUnits ())
526527
527528 // Releases
528529 m .Group ("/:username/:reponame" , func () {
0 commit comments