From ccb034382850b7e8ea924a4559e47ef44203155c Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 3 Feb 2017 09:30:57 -0500 Subject: Implement POST /users/ids endpoint for APIv4 (#5274) --- api/user.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'api') diff --git a/api/user.go b/api/user.go index bfe2db14e..6f40388b2 100644 --- a/api/user.go +++ b/api/user.go @@ -1571,15 +1571,15 @@ func getProfilesByIds(c *Context, w http.ResponseWriter, r *http.Request) { return } - if profiles, err := app.GetUsersByIds(userIds); err != nil { + if profiles, err := app.GetUsersByIds(userIds, c.IsSystemAdmin()); err != nil { c.Err = err return } else { + profileMap := map[string]*model.User{} for _, p := range profiles { - sanitizeProfile(c, p) + profileMap[p.Id] = p } - - w.Write([]byte(model.UserMapToJson(profiles))) + w.Write([]byte(model.UserMapToJson(profileMap))) } } -- cgit v1.2.3-1-g7c22