MM-24595 Migrate API handler getChannelMember(s) to be compatible with local mode (#14533)

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Eli Yukelzon
2020-05-27 14:58:39 +03:00
коммит произвёл GitHub
родитель cedcb63e83
Коммит b9309b2af1
4 изменённых файлов: 64 добавлений и 52 удалений

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

@@ -44,7 +44,9 @@ func (a *App) SessionHasPermissionToChannel(session model.Session, channelId str
if channelId == "" {
return false
}
if session.IsUnrestricted() {
return true
}
ids, err := a.Srv().Store.Channel().GetAllChannelMembersForUser(session.UserId, true, true)
var channelRoles []string