@@ -472,25 +472,26 @@ func RegisterRoutes(m *macaron.Macaron) {
472
472
m .Post ("/milestone" , repo .UpdateIssueMilestone , reqRepoWriter )
473
473
m .Post ("/assignee" , repo .UpdateIssueAssignee , reqRepoWriter )
474
474
m .Post ("/status" , repo .UpdateIssueStatus , reqRepoWriter )
475
- })
475
+ }, context . CheckUnit ( models . UnitTypeIssues ) )
476
476
m .Group ("/comments/:id" , func () {
477
477
m .Post ("" , repo .UpdateCommentContent )
478
478
m .Post ("/delete" , repo .DeleteComment )
479
- })
479
+ }, context . CheckUnit ( models . UnitTypeIssues ) )
480
480
m .Group ("/labels" , func () {
481
481
m .Post ("/new" , bindIgnErr (auth.CreateLabelForm {}), repo .NewLabel )
482
482
m .Post ("/edit" , bindIgnErr (auth.CreateLabelForm {}), repo .UpdateLabel )
483
483
m .Post ("/delete" , repo .DeleteLabel )
484
484
m .Post ("/initialize" , bindIgnErr (auth.InitializeLabelsForm {}), repo .InitializeLabels )
485
- }, reqRepoWriter , context .RepoRef ())
485
+ }, reqRepoWriter , context .RepoRef (), context . CheckUnit ( models . UnitTypeIssues ) )
486
486
m .Group ("/milestones" , func () {
487
487
m .Combo ("/new" ).Get (repo .NewMilestone ).
488
488
Post (bindIgnErr (auth.CreateMilestoneForm {}), repo .NewMilestonePost )
489
489
m .Get ("/:id/edit" , repo .EditMilestone )
490
490
m .Post ("/:id/edit" , bindIgnErr (auth.CreateMilestoneForm {}), repo .EditMilestonePost )
491
491
m .Get ("/:id/:action" , repo .ChangeMilestonStatus )
492
492
m .Post ("/delete" , repo .DeleteMilestone )
493
- }, reqRepoWriter , context .RepoRef ())
493
+ }, reqRepoWriter , context .RepoRef (), context .CheckUnit (models .UnitTypeIssues ))
494
+
494
495
495
496
m .Combo ("/compare/*" , repo .MustAllowPulls , repo .SetEditorconfigIfExists ).
496
497
Get (repo .CompareAndPullRequest ).
@@ -522,7 +523,7 @@ func RegisterRoutes(m *macaron.Macaron) {
522
523
return
523
524
}
524
525
})
525
- }, reqSignIn , context .RepoAssignment (), context .UnitTypes (), context .LoadRepoUnits (), context . CheckUnit ( models . UnitTypeIssues ) )
526
+ }, reqSignIn , context .RepoAssignment (), context .UnitTypes (), context .LoadRepoUnits ())
526
527
527
528
// Releases
528
529
m .Group ("/:username/:reponame" , func () {
0 commit comments