From dd712b77f7ccc0e3c3f1872c96dc120c20af0b08 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 2 Mar 2022 23:30:14 +0800 Subject: 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 --- models/user/search.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'models') 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 { -- cgit v1.2.3