[MM-24604] Migrate get channel and get channel by name endpoints to local mode (#14547)

* add unix socket listener for mmctl local mode

* First working PoC

* Adds the channel list endpoint

* Add team list endpoint

* Add a LocalClient to the api test helper and start local mode

* Add helper to test with both SystemAdmin and Local clients

* Add some docs

* Adds TestForAllClients test helper

* Incorporating @ashishbhate's proposal for adding test names to the helpers

* [MM-24146] Add unix socket listener for mmctl local mode (#14296)

* add unix socket listener for mmctl local mode

* add a constant for local-mode socket path

* reflect review comments

* Fix init errors after merge

* Adds create channel tests

* Always init local mode to allow for enabling-disabling it via config

* Check the RemoteAddr of the request before marking session as local

* [MM-24604] Migrate get channel and get channel by name endpoints to local mode

* Remove local test conditional

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
Miguel de la Cruz
2020-06-14 10:31:20 +02:00
коммит произвёл GitHub
родитель 81a87533a9
Коммит 4bc859433b
4 изменённых файлов: 22 добавлений и 20 удалений

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

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