diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-20 07:50:26 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-20 07:50:26 -0400 |
commit | 9f9cd6bfc61d82ee0a3d31cee112be7975b8ca86 (patch) | |
tree | 1f50bb78b49e133425bc920ecfc9e25fe613823e /web.go | |
parent | 5cb2d3d2e233def07d6956af47dfc49acc45c7e6 (diff) | |
download | gitea-9f9cd6bfc61d82ee0a3d31cee112be7975b8ca86.tar.gz gitea-9f9cd6bfc61d82ee0a3d31cee112be7975b8ca86.zip |
Work on admin
Diffstat (limited to 'web.go')
-rw-r--r-- | web.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |