MM-27147 - /cloud api endpoints (#15428)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f74b86ae95
Коммит
88aed7ec9e
@@ -218,6 +218,8 @@ const (
|
||||
OFFICE365_SETTINGS_DEFAULT_TOKEN_ENDPOINT = "https://login.microsoftonline.com/common/oauth2/v2.0/token"
|
||||
OFFICE365_SETTINGS_DEFAULT_USER_API_ENDPOINT = "https://graph.microsoft.com/v1.0/me"
|
||||
|
||||
CLOUD_SETTINGS_DEFAULT_CWS_URL = "https://customers.mattermost.com"
|
||||
|
||||
LOCAL_MODE_SOCKET_PATH = "/var/tmp/mattermost_local.socket"
|
||||
)
|
||||
|
||||
@@ -2541,6 +2543,16 @@ func (s *JobSettings) SetDefaults() {
|
||||
}
|
||||
}
|
||||
|
||||
type CloudSettings struct {
|
||||
CWSUrl *string `access:"environment,write_restrictable"`
|
||||
}
|
||||
|
||||
func (s *CloudSettings) SetDefaults() {
|
||||
if s.CWSUrl == nil {
|
||||
s.CWSUrl = NewString(CLOUD_SETTINGS_DEFAULT_CWS_URL)
|
||||
}
|
||||
}
|
||||
|
||||
type PluginState struct {
|
||||
Enable bool
|
||||
}
|
||||
@@ -2849,6 +2861,7 @@ type Config struct {
|
||||
DisplaySettings DisplaySettings
|
||||
GuestAccountsSettings GuestAccountsSettings
|
||||
ImageProxySettings ImageProxySettings
|
||||
CloudSettings CloudSettings
|
||||
}
|
||||
|
||||
func (o *Config) Clone() *Config {
|
||||
@@ -2935,6 +2948,7 @@ func (o *Config) SetDefaults() {
|
||||
o.DisplaySettings.SetDefaults()
|
||||
o.GuestAccountsSettings.SetDefaults()
|
||||
o.ImageProxySettings.SetDefaults(o.ServiceSettings)
|
||||
o.CloudSettings.SetDefaults()
|
||||
}
|
||||
|
||||
func (o *Config) IsValid() *AppError {
|
||||
|
||||
Ссылка в новой задаче
Block a user