summaryrefslogtreecommitdiffstats
path: root/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'web.go')
-rw-r--r--web.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/web.go b/web.go
index ceb193e6fd..a5a8305aee 100644
--- a/web.go
+++ b/web.go
@@ -21,6 +21,7 @@ import (
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/middleware"
"github.com/gogits/gogs/routers"
+ "github.com/gogits/gogs/routers/admin"
"github.com/gogits/gogs/routers/dev"
"github.com/gogits/gogs/routers/repo"
"github.com/gogits/gogs/routers/user"
@@ -99,6 +100,11 @@ func runWeb(*cli.Context) {
m.Get("/help", routers.Help)
+ adminReq := middleware.AdminRequire()
+ m.Any("/admin", reqSignIn, adminReq, admin.Dashboard)
+ m.Any("/admin/users", reqSignIn, adminReq, admin.Users)
+ m.Any("/admin/repos", reqSignIn, adminReq, admin.Repositories)
+
m.Post("/:username/:reponame/settings", reqSignIn, middleware.RepoAssignment(true), repo.SettingPost)
m.Get("/:username/:reponame/settings", reqSignIn, middleware.RepoAssignment(true), repo.Setting)