1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor admin user filter query parameters (#18965) (#18975)

Only pass `status_filter` on admin page
Use a more general method to pass query parameters, remove hard-coded keys

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Otto Richter (fnetX)
2022-03-02 19:57:18 +01:00
committed by GitHub
parent f9b6404950
commit 578f19a682
4 changed files with 14 additions and 11 deletions

View File

@@ -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 {