[MM-28313] Add Cloud Billing feature flag (#15391)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1ab06ffa7c
Коммит
c1ac3e69f0
@@ -636,6 +636,7 @@ func (s *Server) trackConfig() {
|
|||||||
"enable_click_to_reply": *cfg.ExperimentalSettings.EnableClickToReply,
|
"enable_click_to_reply": *cfg.ExperimentalSettings.EnableClickToReply,
|
||||||
"restrict_system_admin": *cfg.ExperimentalSettings.RestrictSystemAdmin,
|
"restrict_system_admin": *cfg.ExperimentalSettings.RestrictSystemAdmin,
|
||||||
"use_new_saml_library": *cfg.ExperimentalSettings.UseNewSAMLLibrary,
|
"use_new_saml_library": *cfg.ExperimentalSettings.UseNewSAMLLibrary,
|
||||||
|
"cloud_billing": *cfg.ExperimentalSettings.CloudBilling,
|
||||||
})
|
})
|
||||||
|
|
||||||
s.SendDiagnostic(TRACK_CONFIG_ANALYTICS, map[string]interface{}{
|
s.SendDiagnostic(TRACK_CONFIG_ANALYTICS, map[string]interface{}{
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ func GenerateClientConfig(c *model.Config, diagnosticID string, license *model.L
|
|||||||
props["ExperimentalEnableClickToReply"] = strconv.FormatBool(*c.ExperimentalSettings.EnableClickToReply)
|
props["ExperimentalEnableClickToReply"] = strconv.FormatBool(*c.ExperimentalSettings.EnableClickToReply)
|
||||||
|
|
||||||
props["ExperimentalCloudUserLimit"] = strconv.FormatInt(*c.ExperimentalSettings.CloudUserLimit, 10)
|
props["ExperimentalCloudUserLimit"] = strconv.FormatInt(*c.ExperimentalSettings.CloudUserLimit, 10)
|
||||||
|
props["ExperimentalCloudBilling"] = strconv.FormatBool(*c.ExperimentalSettings.CloudBilling)
|
||||||
if *c.ServiceSettings.ExperimentalChannelOrganization || *c.ServiceSettings.ExperimentalGroupUnreadChannels != model.GROUP_UNREAD_CHANNELS_DISABLED {
|
if *c.ServiceSettings.ExperimentalChannelOrganization || *c.ServiceSettings.ExperimentalGroupUnreadChannels != model.GROUP_UNREAD_CHANNELS_DISABLED {
|
||||||
props["ExperimentalChannelOrganization"] = strconv.FormatBool(true)
|
props["ExperimentalChannelOrganization"] = strconv.FormatBool(true)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -863,6 +863,7 @@ type ExperimentalSettings struct {
|
|||||||
RestrictSystemAdmin *bool `access:"experimental,write_restrictable"`
|
RestrictSystemAdmin *bool `access:"experimental,write_restrictable"`
|
||||||
UseNewSAMLLibrary *bool `access:"experimental"`
|
UseNewSAMLLibrary *bool `access:"experimental"`
|
||||||
CloudUserLimit *int64 `access:"experimental,write_restrictable"`
|
CloudUserLimit *int64 `access:"experimental,write_restrictable"`
|
||||||
|
CloudBilling *bool `access:"experimental,write_restrictable"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *ExperimentalSettings) SetDefaults() {
|
func (s *ExperimentalSettings) SetDefaults() {
|
||||||
@@ -890,6 +891,11 @@ func (s *ExperimentalSettings) SetDefaults() {
|
|||||||
// User limit 0 is treated as no limit
|
// User limit 0 is treated as no limit
|
||||||
s.CloudUserLimit = NewInt64(0)
|
s.CloudUserLimit = NewInt64(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.CloudBilling == nil {
|
||||||
|
s.CloudBilling = NewBool(false)
|
||||||
|
}
|
||||||
|
|
||||||
if s.UseNewSAMLLibrary == nil {
|
if s.UseNewSAMLLibrary == nil {
|
||||||
s.UseNewSAMLLibrary = NewBool(false)
|
s.UseNewSAMLLibrary = NewBool(false)
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user