summaryrefslogtreecommitdiffstats
path: root/models
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 /models
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 'models')
-rw-r--r--models/user/search.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/user/search.go b/models/user/search.go
index fac180529f..a81cee1c22 100644
--- a/models/user/search.go
+++ b/models/user/search.go
@@ -20,6 +20,7 @@ import (
// SearchUserOptions contains the options for searching
type SearchUserOptions struct {
db.ListOptions
+
Keyword string
Type UserType
UID int64
@@ -33,6 +34,8 @@ type SearchUserOptions struct {
IsRestricted util.OptionalBool
IsTwoFactorEnabled util.OptionalBool
IsProhibitLogin util.OptionalBool
+
+ ExtraParamStrings map[string]string
}
func (opts *SearchUserOptions) toSearchQueryBase() *xorm.Session {