@@ -473,25 +473,26 @@ func RegisterRoutes(m *macaron.Macaron) {
473
473
m .Post ("/milestone" , repo .UpdateIssueMilestone , reqRepoWriter )
474
474
m .Post ("/assignee" , repo .UpdateIssueAssignee , reqRepoWriter )
475
475
m .Post ("/status" , repo .UpdateIssueStatus , reqRepoWriter )
476
- })
476
+ }, context . CheckUnit ( models . UnitTypeIssues ) )
477
477
m .Group ("/comments/:id" , func () {
478
478
m .Post ("" , repo .UpdateCommentContent )
479
479
m .Post ("/delete" , repo .DeleteComment )
480
- })
480
+ }, context . CheckUnit ( models . UnitTypeIssues ) )
481
481
m .Group ("/labels" , func () {
482
482
m .Post ("/new" , bindIgnErr (auth.CreateLabelForm {}), repo .NewLabel )
483
483
m .Post ("/edit" , bindIgnErr (auth.CreateLabelForm {}), repo .UpdateLabel )
484
484
m .Post ("/delete" , repo .DeleteLabel )
485
485
m .Post ("/initialize" , bindIgnErr (auth.InitializeLabelsForm {}), repo .InitializeLabels )
486
- }, reqRepoWriter , context .RepoRef ())
486
+ }, reqRepoWriter , context .RepoRef (), context . CheckUnit ( models . UnitTypeIssues ) )
487
487
m .Group ("/milestones" , func () {
488
488
m .Combo ("/new" ).Get (repo .NewMilestone ).
489
489
Post (bindIgnErr (auth.CreateMilestoneForm {}), repo .NewMilestonePost )
490
490
m .Get ("/:id/edit" , repo .EditMilestone )
491
491
m .Post ("/:id/edit" , bindIgnErr (auth.CreateMilestoneForm {}), repo .EditMilestonePost )
492
492
m .Get ("/:id/:action" , repo .ChangeMilestonStatus )
493
493
m .Post ("/delete" , repo .DeleteMilestone )
494
- }, reqRepoWriter , context .RepoRef ())
494
+ }, reqRepoWriter , context .RepoRef (), context .CheckUnit (models .UnitTypeIssues ))
495
+
495
496
496
497
m .Combo ("/compare/*" , repo .MustAllowPulls , repo .SetEditorconfigIfExists ).
497
498
Get (repo .CompareAndPullRequest ).
@@ -523,7 +524,7 @@ func RegisterRoutes(m *macaron.Macaron) {
523
524
return
524
525
}
525
526
})
526
- }, reqSignIn , context .RepoAssignment (), context .UnitTypes (), context .LoadRepoUnits (), context . CheckUnit ( models . UnitTypeIssues ) )
527
+ }, reqSignIn , context .RepoAssignment (), context .UnitTypes (), context .LoadRepoUnits ())
527
528
528
529
// Releases
529
530
m .Group ("/:username/:reponame" , func () {
@@ -558,7 +559,7 @@ func RegisterRoutes(m *macaron.Macaron) {
558
559
m .Get ("/^:type(issues|pulls)$/:index" , repo .ViewIssue )
559
560
m .Get ("/labels/" , repo .RetrieveLabels , repo .Labels )
560
561
m .Get ("/milestones" , repo .Milestones )
561
- }, context .RepoRef (), context . CheckUnit ( models . UnitTypeIssues ) )
562
+ }, context .RepoRef ())
562
563
563
564
// m.Get("/branches", repo.Branches)
564
565
m .Post ("/branches/:name/delete" , reqSignIn , reqRepoWriter , repo .MustBeNotBare , repo .DeleteBranchPost )
0 commit comments