mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
fix: user filter revisit (#24088)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -199,11 +199,11 @@ type UserListInput struct {
|
||||
RoleAssignmentProjectId string `json:"role_assignment_project_id"`
|
||||
|
||||
// email
|
||||
Email string `json:"email"`
|
||||
Email []string `json:"email"`
|
||||
// mobile
|
||||
Mobile string `json:"mobile"`
|
||||
Mobile []string `json:"mobile"`
|
||||
// displayname
|
||||
Displayname string `json:"displayname"`
|
||||
Displayname []string `json:"displayname"`
|
||||
|
||||
// 是否允许web控制台登录
|
||||
AllowWebConsole *bool `json:"allow_web_console"`
|
||||
|
||||
@@ -31,7 +31,7 @@ import (
|
||||
|
||||
func GetServiceIdByType(s *mcclient.ClientSession, typeStr string, verStr string) (string, error) {
|
||||
params := jsonutils.NewDict()
|
||||
if len(verStr) > 0 {
|
||||
if len(verStr) > 0 && verStr != "v1" {
|
||||
typeStr += "_" + verStr
|
||||
}
|
||||
params.Add(jsonutils.NewString(typeStr), "type")
|
||||
|
||||
@@ -440,13 +440,13 @@ func (manager *SUserManager) ListItemFilter(
|
||||
}
|
||||
|
||||
if len(query.Email) > 0 {
|
||||
q = q.Equals("email", query.Email)
|
||||
q = q.In("email", query.Email)
|
||||
}
|
||||
if len(query.Mobile) > 0 {
|
||||
q = q.Equals("mobile", query.Mobile)
|
||||
q = q.In("mobile", query.Mobile)
|
||||
}
|
||||
if len(query.Displayname) > 0 {
|
||||
q = q.Equals("displayname", query.Displayname)
|
||||
q = q.In("displayname", query.Displayname)
|
||||
}
|
||||
if query.AllowWebConsole != nil {
|
||||
if *query.AllowWebConsole {
|
||||
|
||||
Reference in New Issue
Block a user