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
@@ -12,8 +12,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
UserPropsKeyRemoteUsername = "RemoteUsername"
|
||||
UserPropsKeyRemoteEmail = "RemoteEmail"
|
||||
UserPropsKeyRemoteUsername = "RemoteUsername"
|
||||
UserPropsKeyRemoteEmail = "RemoteEmail"
|
||||
UserPropsKeyOriginalRemoteId = "OriginalRemoteId"
|
||||
UserOriginalRemoteIdUnknown = "UNKNOWN"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -936,6 +936,22 @@ func (u *User) GetRemoteID() string {
|
||||
return SafeDereference(u.RemoteId)
|
||||
}
|
||||
|
||||
func (u *User) GetOriginalRemoteID() string {
|
||||
if u.Props == nil {
|
||||
if u.IsRemote() {
|
||||
return UserOriginalRemoteIdUnknown
|
||||
}
|
||||
return "" // Local user
|
||||
}
|
||||
if originalId, exists := u.Props[UserPropsKeyOriginalRemoteId]; exists && originalId != "" {
|
||||
return originalId
|
||||
}
|
||||
if u.IsRemote() {
|
||||
return UserOriginalRemoteIdUnknown
|
||||
}
|
||||
return "" // Local user
|
||||
}
|
||||
|
||||
func (u *User) GetAuthData() string {
|
||||
return SafeDereference(u.AuthData)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user