MM-44642 hide insights per license (#20490)

* MM-44642: Add a config key for Insights.

* MM-44642: Includes feature flag in config key/value conditional. Adds tests.

* MM-44642: Send the EnableCustomGroups and InsightsEnabled keys to unlicensed clients too.

* MM-44642: Adds some tests for Custom Groups config setting.
Этот коммит содержится в:
Martin Kraft
2022-06-17 08:07:28 -04:00
коммит произвёл GitHub
родитель 19d6fe40c2
Коммит 3703f943ec
2 изменённых файлов: 118 добавлений и 0 удалений

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

@@ -129,6 +129,8 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
props["IsDefaultMarketplace"] = strconv.FormatBool(*c.PluginSettings.MarketplaceURL == model.PluginSettingsDefaultMarketplaceURL)
props["ExperimentalSharedChannels"] = "false"
props["CollapsedThreads"] = *c.ServiceSettings.CollapsedThreads
props["EnableCustomGroups"] = "false"
props["InsightsEnabled"] = "false"
if license != nil {
props["ExperimentalEnableAuthenticationTransfer"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalEnableAuthenticationTransfer)
@@ -203,6 +205,10 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
if license.SkuShortName == model.LicenseShortSkuProfessional || license.SkuShortName == model.LicenseShortSkuEnterprise {
props["EnableCustomGroups"] = strconv.FormatBool(*c.ServiceSettings.EnableCustomGroups)
}
if (license.SkuShortName == model.LicenseShortSkuProfessional || license.SkuShortName == model.LicenseShortSkuEnterprise) && c.FeatureFlags.InsightsEnabled {
props["InsightsEnabled"] = "true"
}
}
return props