MM-27493 Shared channels (MVP) (#17301)
Remote Cluster Service - provides ability for multiple Mattermost cluster instances to create a trusted connection with each other and exchange messages - trusted connections are managed via slash commands (for now) - facilitates features requiring inter-cluster communication, such as Shared Channels Shared Channels Service - provides ability to shared channels between one or more Mattermost cluster instances (using trusted connection) - sharing/unsharing of channels is managed via slash commands (for now)
Этот коммит содержится в:
@@ -20,6 +20,7 @@ const (
|
||||
TokenLocationCookie
|
||||
TokenLocationQueryString
|
||||
TokenLocationCloudHeader
|
||||
TokenLocationRemoteClusterHeader
|
||||
)
|
||||
|
||||
func (tl TokenLocation) String() string {
|
||||
@@ -34,6 +35,8 @@ func (tl TokenLocation) String() string {
|
||||
return "QueryString"
|
||||
case TokenLocationCloudHeader:
|
||||
return "CloudHeader"
|
||||
case TokenLocationRemoteClusterHeader:
|
||||
return "RemoteClusterHeader"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
@@ -291,5 +294,9 @@ func ParseAuthTokenFromRequest(r *http.Request) (string, TokenLocation) {
|
||||
return token, TokenLocationCloudHeader
|
||||
}
|
||||
|
||||
if token := r.Header.Get(model.HEADER_REMOTECLUSTER_TOKEN); token != "" {
|
||||
return token, TokenLocationRemoteClusterHeader
|
||||
}
|
||||
|
||||
return "", TokenLocationNotFound
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user