summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-03 09:30:57 -0500
committerCorey Hulen <corey@hulen.com>2017-02-03 09:30:57 -0500
commitccb034382850b7e8ea924a4559e47ef44203155c (patch)
tree72026c58e6bb8e8ad679ac07476906281ffbb1d5 /api/user.go
parent177589b1e26fcabd7749dd0fbe8c39999c206609 (diff)
downloadchat-ccb034382850b7e8ea924a4559e47ef44203155c.tar.gz
chat-ccb034382850b7e8ea924a4559e47ef44203155c.tar.bz2
chat-ccb034382850b7e8ea924a4559e47ef44203155c.zip
Implement POST /users/ids endpoint for APIv4 (#5274)
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go8
1 files changed, 4 insertions, 4 deletions
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)))
}
}