Improves the invite mechanism for remote clusters (#31025)
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e51ea025db
Коммит
fbf105f6ef
@@ -363,10 +363,12 @@ type RemoteClusterPing struct {
|
||||
|
||||
// RemoteClusterInvite represents an invitation to establish a simple trust with a remote cluster.
|
||||
type RemoteClusterInvite struct {
|
||||
RemoteId string `json:"remote_id"`
|
||||
RemoteTeamId string `json:"remote_team_id"` // Deprecated: this field is no longer used. It's only kept for backwards compatibility.
|
||||
SiteURL string `json:"site_url"`
|
||||
Token string `json:"token"`
|
||||
RemoteId string `json:"remote_id"`
|
||||
RemoteTeamId string `json:"remote_team_id"` // Deprecated: this field is no longer used. It's only kept for backwards compatibility.
|
||||
SiteURL string `json:"site_url"`
|
||||
Token string `json:"token"`
|
||||
RefreshedToken string `json:"refreshed_token,omitempty"` // New token generated by the remote cluster when accepting an invitation
|
||||
Version int `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
func (rci *RemoteClusterInvite) IsValid() *AppError {
|
||||
|
||||
@@ -160,9 +160,11 @@ func TestRemoteClusterInviteEncryption(t *testing.T) {
|
||||
|
||||
func makeInvite(url string) RemoteClusterInvite {
|
||||
return RemoteClusterInvite{
|
||||
RemoteId: NewId(),
|
||||
SiteURL: url,
|
||||
Token: NewId(),
|
||||
RemoteId: NewId(),
|
||||
SiteURL: url,
|
||||
Token: NewId(),
|
||||
RefreshedToken: NewId(),
|
||||
Version: 2,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user