aboutsummaryrefslogtreecommitdiffstats
path: root/routers/admin/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r--routers/admin/admin.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index ebc446b820..75dbf2712b 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -23,7 +23,6 @@ import (
const (
DASHBOARD base.TplName = "admin/dashboard"
- USERS base.TplName = "admin/users"
REPOS base.TplName = "admin/repos"
AUTHS base.TplName = "admin/auths"
CONFIG base.TplName = "admin/config"
@@ -157,35 +156,6 @@ func Dashboard(ctx *middleware.Context) {
ctx.HTML(200, DASHBOARD)
}
-func Users(ctx *middleware.Context) {
- ctx.Data["Title"] = "User Management"
- ctx.Data["PageIsUsers"] = true
-
- p := com.StrTo(ctx.Query("p")).MustInt()
- if p < 1 {
- p = 1
- }
- pageNum := 50
- count := models.CountUsers()
- curCount := int64((p-1)*pageNum + pageNum)
- if curCount > count {
- p = int(count) / pageNum
- } else if count > curCount {
- ctx.Data["NextPageNum"] = p + 1
- }
- if p > 1 {
- ctx.Data["LastPageNum"] = p - 1
- }
-
- var err error
- ctx.Data["Users"], err = models.GetUsers(pageNum, (p-1)*pageNum)
- if err != nil {
- ctx.Handle(500, "admin.Users(GetUsers)", err)
- return
- }
- ctx.HTML(200, USERS)
-}
-
func Repositories(ctx *middleware.Context) {
ctx.Data["Title"] = "Repository Management"
ctx.Data["PageIsRepos"] = true