Work on admin
This commit is contained in:
parent
5cb2d3d2e2
commit
9f9cd6bfc6
19 changed files with 177 additions and 41 deletions
6
web.go
6
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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue