diff options
author | Unknwon <u@gogs.io> | 2016-03-15 14:23:12 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-15 14:23:12 -0400 |
commit | 149d62a648d5b852e43125834ed9b1cb6b49bdc0 (patch) | |
tree | 6380491938794ab1125fde8e488c8e2840c038cd /routers/admin | |
parent | 9df5c39bca6fb397449525b0f1eb0d24d993439f (diff) | |
download | gitea-149d62a648d5b852e43125834ed9b1cb6b49bdc0.tar.gz gitea-149d62a648d5b852e43125834ed9b1cb6b49bdc0.zip |
#13 fix admin can't search private repos
- update glide info
Diffstat (limited to 'routers/admin')
-rw-r--r-- | routers/admin/orgs.go | 10 | ||||
-rw-r--r-- | routers/admin/repos.go | 10 | ||||
-rw-r--r-- | routers/admin/users.go | 10 |
3 files changed, 24 insertions, 6 deletions
diff --git a/routers/admin/orgs.go b/routers/admin/orgs.go index 395243a5f7..28e9d79f06 100644 --- a/routers/admin/orgs.go +++ b/routers/admin/orgs.go @@ -21,6 +21,12 @@ func Organizations(ctx *context.Context) { ctx.Data["PageIsAdmin"] = true ctx.Data["PageIsAdminOrganizations"] = true - routers.RenderUserSearch(ctx, models.USER_TYPE_ORGANIZATION, models.CountOrganizations, models.Organizations, - setting.AdminOrgPagingNum, "id ASC", ORGS) + routers.RenderUserSearch(ctx, &routers.UserSearchOptions{ + Type: models.USER_TYPE_ORGANIZATION, + Counter: models.CountOrganizations, + Ranger: models.Organizations, + PageSize: setting.AdminOrgPagingNum, + OrderBy: "id ASC", + TplName: ORGS, + }) } diff --git a/routers/admin/repos.go b/routers/admin/repos.go index e78941ab4c..8b5caa8d72 100644 --- a/routers/admin/repos.go +++ b/routers/admin/repos.go @@ -22,8 +22,14 @@ func Repos(ctx *context.Context) { ctx.Data["PageIsAdmin"] = true ctx.Data["PageIsAdminRepositories"] = true - routers.RenderRepoSearch(ctx, models.CountRepositories, models.Repositories, - setting.AdminRepoPagingNum, "id ASC", REPOS) + routers.RenderRepoSearch(ctx, &routers.RepoSearchOptions{ + Counter: models.CountRepositories, + Ranger: models.Repositories, + Private: true, + PageSize: setting.AdminRepoPagingNum, + OrderBy: "id ASC", + TplName: REPOS, + }) } func DeleteRepo(ctx *context.Context) { diff --git a/routers/admin/users.go b/routers/admin/users.go index 00028a2fdd..76fbcd1683 100644 --- a/routers/admin/users.go +++ b/routers/admin/users.go @@ -30,8 +30,14 @@ func Users(ctx *context.Context) { ctx.Data["PageIsAdmin"] = true ctx.Data["PageIsAdminUsers"] = true - routers.RenderUserSearch(ctx, models.USER_TYPE_INDIVIDUAL, models.CountUsers, models.Users, - setting.AdminUserPagingNum, "id ASC", USERS) + routers.RenderUserSearch(ctx, &routers.UserSearchOptions{ + Type: models.USER_TYPE_INDIVIDUAL, + Counter: models.CountUsers, + Ranger: models.Users, + PageSize: setting.AdminUserPagingNum, + OrderBy: "id ASC", + TplName: USERS, + }) } func NewUser(ctx *context.Context) { |