summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-03-02 23:30:14 +0800
committerGitHub <noreply@github.com>2022-03-02 16:30:14 +0100
commitdd712b77f7ccc0e3c3f1872c96dc120c20af0b08 (patch)
tree6b96634aa6fed42ee7d5ab2862a3f48b8ddafd64 /modules
parenta14b6f3aae196b2506e07f1dcfcd38d338b91e68 (diff)
downloadgitea-dd712b77f7ccc0e3c3f1872c96dc120c20af0b08.tar.gz
gitea-dd712b77f7ccc0e3c3f1872c96dc120c20af0b08.zip
Refactor admin user filter query parameters (#18965)
Only pass `status_filter` on admin page Use a more general method to pass query parameters, remove hard-coded keys
Diffstat (limited to 'modules')
-rw-r--r--modules/context/pagination.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/modules/context/pagination.go b/modules/context/pagination.go
index 140b676786..107cbf6186 100644
--- a/modules/context/pagination.go
+++ b/modules/context/pagination.go
@@ -55,12 +55,3 @@ func (p *Pagination) SetDefaultParams(ctx *Context) {
p.AddParam(ctx, "tab", "TabName")
p.AddParam(ctx, "t", "queryType")
}
-
-// SetUserFilterParams sets common pagination params for user filtering, e.g. the admin userlist
-func (p *Pagination) SetUserFilterParams(ctx *Context) {
- p.AddParamString("status_filter[is_active]", ctx.FormString("status_filter[is_active]"))
- p.AddParamString("status_filter[is_admin]", ctx.FormString("status_filter[is_admin]"))
- p.AddParamString("status_filter[is_restricted]", ctx.FormString("status_filter[is_restricted]"))
- p.AddParamString("status_filter[is_2fa_enabled]", ctx.FormString("status_filter[is_2fa_enabled]"))
- p.AddParamString("status_filter[is_prohibit_login]", ctx.FormString("status_filter[is_prohibit_login]"))
-}