MM-64531: [Shared Channels] Users on different remote servers should not communicate unless the remotes have established secure connection. (#30985) (#33434)
Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3a6aeee57e
Коммит
07a34f02b6
@@ -28,6 +28,7 @@ type SharedChannelServiceIFace interface {
|
||||
CheckChannelIsShared(channelID string) error
|
||||
CheckCanInviteToSharedChannel(channelId string) error
|
||||
HandleMembershipChange(channelID, userID string, isAdd bool, remoteID string)
|
||||
IsRemoteClusterDirectlyConnected(remoteId string) bool
|
||||
TransformMentionsOnReceiveForTesting(ctx request.CTX, post *model.Post, targetChannel *model.Channel, rc *model.RemoteCluster, mentionTransforms map[string]string)
|
||||
}
|
||||
|
||||
@@ -100,3 +101,11 @@ func (mrcs *mockSharedChannelService) HandleMembershipChange(channelID, userID s
|
||||
mrcs.SharedChannelServiceIFace.HandleMembershipChange(channelID, userID, isAdd, remoteID)
|
||||
}
|
||||
}
|
||||
|
||||
func (mrcs *mockSharedChannelService) IsRemoteClusterDirectlyConnected(remoteId string) bool {
|
||||
if mrcs.SharedChannelServiceIFace != nil {
|
||||
return mrcs.SharedChannelServiceIFace.IsRemoteClusterDirectlyConnected(remoteId)
|
||||
}
|
||||
// Default behavior for mock: Local server is always connected
|
||||
return remoteId == ""
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user