Split CWS url in two: public and API (#17100)

Signed-off-by: Mario de Frutos <mario@defrutos.org>

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
Mario de Frutos Dieguez
2021-03-23 15:27:40 +01:00
committed by GitHub
parent 545670a047
commit 3d845feb7e

View File

@@ -235,8 +235,9 @@ 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"
OPENID_SETTINGS_DEFAULT_SCOPE = "profile openid email"
CLOUD_SETTINGS_DEFAULT_CWS_URL = "https://customers.mattermost.com"
CLOUD_SETTINGS_DEFAULT_CWS_API_URL = "https://portal.internal.prod.cloud.mattermost.com"
OPENID_SETTINGS_DEFAULT_SCOPE = "profile openid email"
LOCAL_MODE_SOCKET_PATH = "/var/tmp/mattermost_local.socket"
)
@@ -2702,13 +2703,17 @@ func (s *JobSettings) SetDefaults() {
}
type CloudSettings struct {
CWSUrl *string `access:"environment,write_restrictable"`
CWSUrl *string `access:"environment,write_restrictable"`
CWSAPIUrl *string `access:"environment,write_restrictable"`
}
func (s *CloudSettings) SetDefaults() {
if s.CWSUrl == nil {
s.CWSUrl = NewString(CLOUD_SETTINGS_DEFAULT_CWS_URL)
}
if s.CWSAPIUrl == nil {
s.CWSAPIUrl = NewString(CLOUD_SETTINGS_DEFAULT_CWS_API_URL)
}
}
type PluginState struct {