Skip to content

Commit

Permalink
修复获取用户数据,指定参数没使用上 (#5432)
Browse files Browse the repository at this point in the history
  • Loading branch information
laodiu authored Jul 1, 2021
1 parent db90576 commit 8081fc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,9 @@ func (m *user) GetLoginUrl(c *gin.Context, config map[string]string, input *meta
return loginURL
}

func (m *user) GetUserList(c *gin.Context, config map[string]string) ([]*metadata.LoginSystemUserInfo, *errors.RawErrorInfo) {
func (m *user) GetUserList(c *gin.Context, params map[string]string) ([]*metadata.LoginSystemUserInfo, *errors.RawErrorInfo) {
rid := util.GetHTTPCCRequestID(c.Request.Header)
query := c.Request.URL.Query()
params := make(map[string]string)
for key, values := range query {
params[key] = strings.Join(values, ";")
}
Expand Down
2 changes: 1 addition & 1 deletion src/web_server/service/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (s *Service) getUsernameFromEsb(c *gin.Context, userList []string) (map[str
params["fields"] = "username,display_name"
user := plugins.CurrentPlugin(c, s.Config.LoginVersion)

userListEsb, errNew := user.GetUserList(c, s.Config.ConfigMap)
userListEsb, errNew := user.GetUserList(c, params)
if errNew != nil {
blog.ErrorJSON("get user list from ESB failed, err: %s, rid: %s", errNew.ToCCError(defErr).Error(), rid)
userListEsb = []*metadata.LoginSystemUserInfo{}
Expand Down

0 comments on commit 8081fc7

Please sign in to comment.