MM-24872/MM-24873: local mode support for addTeamMember and removeTeamMember (#14534)

* Add local mode handler for addTeamMember

* Add local mode handler for remoteTeamMember

* short circuit session team permission for local mode

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Этот коммит содержится в:
Ashish Bhate
2020-05-22 15:52:57 +05:30
коммит произвёл GitHub
родитель abce5d620f
Коммит ea86dc9a62
4 изменённых файлов: 54 добавлений и 23 удалений

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

@@ -270,6 +270,9 @@ func InitLocal(configservice configservice.ConfigService, globalOptionsFunc app.
api.BaseRoutes.ApiRoot = root.PathPrefix(model.API_URL_SUFFIX).Subrouter()
api.BaseRoutes.Teams = api.BaseRoutes.ApiRoot.PathPrefix("/teams").Subrouter()
api.BaseRoutes.Team = api.BaseRoutes.Teams.PathPrefix("/{team_id:[A-Za-z0-9]+}").Subrouter()
api.BaseRoutes.TeamMembers = api.BaseRoutes.Team.PathPrefix("/members").Subrouter()
api.BaseRoutes.TeamMember = api.BaseRoutes.TeamMembers.PathPrefix("/{user_id:[A-Za-z0-9]+}").Subrouter()
api.BaseRoutes.Channels = api.BaseRoutes.ApiRoot.PathPrefix("/channels").Subrouter()