Mm 52577 Tie use of Stripe (or its mock) to use of CWS (or its mock) (#23277)

* set config CWSMock value according to model.MockCWS
Этот коммит содержится в:
Nathaniel Allred
2023-05-05 10:03:12 -05:00
коммит произвёл GitHub
родитель 9f1796f98b
Коммит 9ee3526ca1
13 изменённых файлов: 35 добавлений и 27 удалений

Просмотреть файл

@@ -93,6 +93,7 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
props["EnableEmailInvitations"] = strconv.FormatBool(*c.ServiceSettings.EnableEmailInvitations)
props["CWSURL"] = *c.CloudSettings.CWSURL
props["CWSMock"] = model.MockCWS
props["DisableRefetchingOnBrowserFocus"] = strconv.FormatBool(*c.ExperimentalSettings.DisableRefetchingOnBrowserFocus)

Просмотреть файл

@@ -2780,6 +2780,7 @@ func (s *JobSettings) SetDefaults() {
type CloudSettings struct {
CWSURL *string `access:"write_restrictable"`
CWSAPIURL *string `access:"write_restrictable"`
CWSMock *bool `access:"write_restrictable"`
}
func (s *CloudSettings) SetDefaults() {
@@ -2795,6 +2796,10 @@ func (s *CloudSettings) SetDefaults() {
s.CWSAPIURL = NewString(CloudSettingsDefaultCwsAPIURLTest)
}
}
if s.CWSMock == nil {
isMockCws := MockCWS == "true"
s.CWSMock = &isMockCws
}
}
type ProductSettings struct {