@@ -479,7 +479,7 @@ func RegisterRoutes(m *macaron.Macaron) {
479
479
// FIXME: should use different URLs but mostly same logic for comments of issue and pull reuqest.
480
480
// So they can apply their own enable/disable logic on routers.
481
481
m .Group ("/issues" , func () {
482
- m .Combo ("/new" , repo . MustEnableIssues ).Get (context .RepoRef (), repo .NewIssue ).
482
+ m .Combo ("/new" ).Get (context .RepoRef (), repo .NewIssue ).
483
483
Post (bindIgnErr (auth.CreateIssueForm {}), repo .NewIssuePost )
484
484
485
485
m .Group ("/:index" , func () {
@@ -606,12 +606,12 @@ func RegisterRoutes(m *macaron.Macaron) {
606
606
Post (bindIgnErr (auth.NewWikiForm {}), repo .EditWikiPost )
607
607
m .Post ("/:page/delete" , repo .DeleteWikiPagePost )
608
608
}, reqSignIn , reqRepoWriter )
609
- }, repo .MustEnableWiki , context .RepoRef (), context . CheckUnit ( models . UnitTypeWiki ) )
609
+ }, repo .MustEnableWiki , context .RepoRef ())
610
610
611
611
m .Group ("/wiki" , func () {
612
612
m .Get ("/raw/*" , repo .WikiRaw )
613
613
m .Get ("/*" , repo .WikiRaw )
614
- }, repo .MustEnableWiki , context . CheckUnit ( models . UnitTypeWiki ), context . CheckUnit ( models . UnitTypeWiki ) )
614
+ }, repo .MustEnableWiki )
615
615
616
616
m .Get ("/archive/*" , repo .MustBeNotBare , context .CheckUnit (models .UnitTypeCode ), repo .Download )
617
617
@@ -620,7 +620,7 @@ func RegisterRoutes(m *macaron.Macaron) {
620
620
m .Get ("/files" , context .RepoRef (), repo .SetEditorconfigIfExists , repo .SetDiffViewStyle , repo .ViewPullFiles )
621
621
m .Post ("/merge" , reqRepoWriter , repo .MergePullRequest )
622
622
m .Post ("/cleanup" , context .RepoRef (), repo .CleanUpPullRequest )
623
- }, repo .MustAllowPulls , context . CheckUnit ( models . UnitTypePullRequests ) )
623
+ }, repo .MustAllowPulls )
624
624
625
625
m .Group ("" , func () {
626
626
m .Get ("/raw/*" , repo .SingleDownload )
0 commit comments