summaryrefslogtreecommitdiffstats
path: root/web.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-20 07:50:26 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-20 07:50:26 -0400
commit9f9cd6bfc61d82ee0a3d31cee112be7975b8ca86 (patch)
tree1f50bb78b49e133425bc920ecfc9e25fe613823e /web.go
parent5cb2d3d2e233def07d6956af47dfc49acc45c7e6 (diff)
downloadgitea-9f9cd6bfc61d82ee0a3d31cee112be7975b8ca86.tar.gz
gitea-9f9cd6bfc61d82ee0a3d31cee112be7975b8ca86.zip
Work on admin
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)