aboutsummaryrefslogtreecommitdiffstats
path: root/routers/routes/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/routes/routes.go')
-rw-r--r--routers/routes/routes.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index 7e81f55de6..74bddc79e5 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -261,6 +261,11 @@ func RegisterRoutes(m *macaron.Macaron) {
}
m.Use(user.GetNotificationCount)
+ m.Use(func(ctx *context.Context) {
+ ctx.Data["UnitWikiGlobalDisabled"] = models.UnitTypeWiki.UnitGlobalDisabled()
+ ctx.Data["UnitIssuesGlobalDisabled"] = models.UnitTypeIssues.UnitGlobalDisabled()
+ ctx.Data["UnitPullsGlobalDisabled"] = models.UnitTypePullRequests.UnitGlobalDisabled()
+ })
// FIXME: not all routes need go through same middlewares.
// Especially some AJAX requests, we can reduce middleware number to improve performance.