Implement POST /users/ids endpoint for APIv4 (#5274)

Этот коммит содержится в:
Joram Wilander
2017-02-03 09:30:57 -05:00
коммит произвёл Corey Hulen
родитель 177589b1e2
Коммит ccb0343828
7 изменённых файлов: 139 добавлений и 31 удалений

Просмотреть файл

@@ -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)))
}
}