MM-18512 Use options struct for GetProfilesWithoutTeam and add filtering to API (#12200)

* Use options struct for GetProfilesWithoutTeam and add filtering

* Fix test
Этот коммит содержится в:
Joram Wilander
2019-09-17 15:13:17 -04:00
коммит произвёл Miguel de la Cruz
родитель 4ce7b92283
Коммит 3d4c941ba8
11 изменённых файлов: 137 добавлений и 833 удалений

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

@@ -557,7 +557,7 @@ func getUsers(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
profiles, err = c.App.GetUsersWithoutTeamPage(c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), restrictions)
profiles, err = c.App.GetUsersWithoutTeamPage(userGetOptions, c.IsSystemAdmin())
} else if len(notInChannelId) > 0 {
if !c.App.SessionHasPermissionToChannel(c.App.Session, notInChannelId, model.PERMISSION_READ_CHANNEL) {
c.SetPermissionError(model.PERMISSION_READ_CHANNEL)