mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
[F3] introduce UserTypeF3
To avoid conflicts should UserTypeRemoteUser be used differently by Gitea
This commit is contained in:
parent
4dd5b8b8bd
commit
6de2701bb3
4 changed files with 27 additions and 9 deletions
|
@ -39,7 +39,12 @@ type SearchUserOptions struct {
|
|||
}
|
||||
|
||||
func (opts *SearchUserOptions) toSearchQueryBase() *xorm.Session {
|
||||
var cond builder.Cond = builder.Eq{"type": opts.Type}
|
||||
var cond builder.Cond
|
||||
if opts.Type == UserTypeIndividual {
|
||||
cond = builder.In("type", UserTypeIndividual, UserTypeF3)
|
||||
} else {
|
||||
cond = builder.Eq{"type": opts.Type}
|
||||
}
|
||||
if len(opts.Keyword) > 0 {
|
||||
lowerKeyword := strings.ToLower(opts.Keyword)
|
||||
keywordCond := builder.Or(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue